Abstract
Private
_targetIf non-null, layer is only visible in that viewport
Private
_visibleVisibility of the scene layer
Private
sceneProtected
sceneContainer object for all 3D objects of this scene layer
Private
signalList of signal connections that will be disconnected automatically when the view is destroyed
Static
Protected
Readonly
ORTHO_Time in ms to debounce map view rendering by to avoid unnecessary work.
Target viewport
Target viewport
Layer visibility
Layer visibility
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.
Protected
isCalled 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 a viewport. Updates layer visibility depending on viewport and avoids raycasting objects if #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 AbstractViewInterface has completed any asynchronous work, independent of whether it rejects or resolves.
Called for mouse clicks and taps
Return true to consume the event, false to pass it on
Mouse position
Optional
cursorPos: Vector3Cursor position at time of the mouse click
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.
List of context menu items
Mouse position
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
Return true to consume the event, false to pass it on
Mouse position
Called for click-and-hold and touch-and-hold
Return true to consume the event, false to pass it on
Mouse position
Called when the mouse is moved
Mouse position
Called when the mouse wheel is used
Return true to consume the event, false to pass it on
Mouse position
Number of wheel ticks, positive for scrolling down, negative for up
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 AbstractViewInterface has completed any asynchronous work, independent of whether it rejects or resolves.
Protected
trackWrap 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.
Signal that keeps track of connections made to it.
The signal to wrap.
Protected
visibilityGenerated using TypeDoc
A scene layer that displays objects in the 3D scene. This interface serves as a template to construct your own custom data layers. Public methods described in this class act as callbacks to particular events occurring in the view (Main or Map view) to which the scene layer is added.
Note: The mouse or touch event callbacks can also be added to individual THREE.Mesh objects inside data layers. In case of multiple callbacks, Mesh objects are prioritized over data layers. For a complete reference of all of the events supported on THREE.Mesh, see: MouseEventReceiverInterface