Container object for all 3D objects of this scene layer
Time in ms to debounce map view rendering by to avoid unnecessary work.
Retrieve the active viewport. This is either the _targetViewport if defined or
otherwise the view's default viewport.
Note: use this over targetViewport if you just need the active viewport for this
layer and don't care whether a specific one or the default one is specified.
Called after rendering of all viewports
Camera used to render the view
Called after rendering of a viewport
Viewport where rendering took place
Called after the rendering of a scene in a viewport.
Viewport where the rendering took place
The last scene that was rendered.
Called before rendering
Camera used to render the view
Called before rendering a viewport. Updates layer visibility depending on viewport and avoids raycasting objects if {@link #targetViewport} doesn't match the passed viewport.
Note: If you override this method and change the position, orientation or scale of a mesh, and you rely on mouse events on the meshes or use getObjectsUnderCursor(), call this.sceneGroup.updateWorldMatrix(false, true); in your overridden method.
Viewport where rendering takes place
Called shortly after the camera has stopped moving
Promise which blocks until the {@link AbstractView} has completed any asynchronous work, independent of whether it rejects or resolves.
Called for mouse clicks and taps
Mouse position
Cursor position at time of the mouse click
Return true to consume the event, false to pass it on
Called when the context menu is about to be shown
Return context menu items from this method to add them to the context menu. Return undefined (or do not implement the method) if you do not want to add an entry from the specific layer. Return false to prevent the context menu from opening.
Mouse position
List of context menu items
Called when the view is destroyed. Override this method and clean up all references to objects that would prevent garbage collection, e.g., signal handlers and transient fields that your scene layer may have put on entities.
This implementation will detach all signal handlers registered by connectToSignal(), remove the sceneGroup from the scene and set it to undefined.
Override this method to clean up references (and call the super class method)
Called for double clicks and double taps
Mouse position
Return true to consume the event, false to pass it on
Called for click-and-hold and touch-and-hold
Mouse position
Return true to consume the event, false to pass it on
Called when a key is pressed down
Key event data
Return true to consume the event, false to pass it on to other layers
Called when a key is released
Key event data
Return true to consume the event, false to pass it on to other layers
Called when the mouse is moved
Mouse position
Called when the mouse wheel is used
Mouse position
Number of wheel ticks, positive for scrolling down, negative for up
Return true to consume the event, false to pass it on
Called after location transition has completed
Transition event
Called when a location transition is started
Transition event
Called shortly after the camera inside the viewport has stopped moving
The viewport where the camera move happened
Promise which blocks until the {@link AbstractView} has completed any asynchronous work, independent of whether it rejects or resolves.
Wrap the provided Signal into a TrackedSignal which keeps track of calls to its connect method. The connections made through the TrackedSignal will be disconnected automatically when the scene layer is destroyed.
The signal to wrap.
Signal that keeps track of connections made to it.
Callback when visible property is changed
Generated using TypeDoc
CustomLayer enables API users to create a scene layer in any view. Creating a subclass that extends CustomLayer can leverage the event handlers deliniated in SceneLayerInterface.