ID of this Component, unique within the Scene.
Components are mapped by this ID in {@link Scene.components}.
Arbitrary, user-defined metadata on this component.
The parent Scene that contains this Component.
The viewer that contains this Scene.
Canvas-space 2D coordinates of this Marker.
This property is read-only and is automatically calculated from Marker.worldPos and the current Camera position and projection.
The Marker fires a "canvasPos" event whenever this property changes.
Gets the Entity this Marker is associated with.
An Entity is optional. When the Marker has an Entity, then Marker.visible will always be false
if Entity.visible is false.
Sets the Entity this Marker is associated with.
An Entity is optional. When the Marker has an Entity, then Marker.visible will always be false
if Entity.visible is false.
Gets whether occlusion testing is performed for this Marker.
When this is true, then Marker.visible will be false whenever the Marker is occluded by an Entity in the 3D view.
Sets whether occlusion testing is performed for this Marker.
When this is true, then Marker.visible will be false whenever the Marker is occluded by an Entity in the 3D view.
The Scene periodically occlusion-tests all Markers on every 20th "tick" (which represents a rendered frame). We can adjust that frequency via property Scene.ticksPerOcclusionTest.
Gets the RTC center of this Marker.
This is automatically calculated from Marker.worldPos.
Gets the RTC position of this Marker.
This is automatically calculated from Marker.worldPos.
View-space 3D coordinates of this Marker.
This property is read-only and is automatically calculated from Marker.worldPos and the current Camera position.
The Marker fires a "viewPos" event whenever this property changes.
Indicates if this Marker is currently visible.
This is read-only and is automatically calculated.
The Marker is invisible whenever:
false, ortrue and the Marker is currently occluded by an Entity in the 3D view.The Marker fires a "visible" event whenever this property changes.
Gets the World-space 3D position of this Marker.
Fires a "worldPos" event with new World position.
Sets the World-space 3D position of this Marker.
Fires a "worldPos" event with new World position.
Destroys all Components that are owned by this. These are Components that were instantiated with this Component as their first constructor argument.
Destroys this component.
Logs an error for this component to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
Also fires the message as an "error" event on the parent Scene.
The message to log
Fires an event on this component.
Notifies existing subscribers to the event, optionally retains the event to give to any subsequent notifications on the event as they are made.
The event type name
The event parameters
Returns true if there are any subscribers to the given event on this component.
The event
True if there are any subscribers to the given event on this component.
Tests if this component is of the given type, or is a subclass of the given type.
Logs a console debugging message for this component.
The console message will have this format: [LOG] [<component type> <component id>: <message>
Also fires the message as a "log" event on the parent Scene.
The message to log
Cancels an event subscription that was previously made with Component.on or Component.once.
Subscription ID
Subscribes to an event on this component.
The callback is be called with this component as scope.
The event
Called fired on the event
Handle to the subscription, which may be used to unsubscribe with .off.
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.
This is equivalent to calling Component.on, and then calling Component.off inside the callback function.
Data event to listen to
Called when fresh data is available at the event
Logs a warning for this component to the JavaScript console.
The console message will have this format: [WARN] [<component type> =<component id>: <message>
Also fires the message as a "warn" event on the parent Scene.
The message to log
Generated using TypeDoc
Tracks the World, View and Canvas coordinates, and visibility, of a position within a Scene.