The loaded event
Called fired on the event
Scope for the callback
Fires when a model is unloaded
The loaded event
Called fired on the event
Scope for the callback
Fired when about to render a frame for a Scene.
The rendering event
Called fired on the event
Scope for the callback
Fired when we have just rendered a frame for a Scene.
The rendered event
Called fired on the event
Scope for the callback
Fires when the entity visibility is updated.
The rendered event
Called fired on the event
Scope for the callback
Fired on each game loop iteration.
Called fired on the event
Scope for the callback
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.
Gets the World-space axis-aligned 3D boundary (AABB) of this Scene.
The AABB is represented by a six-element Float64Array containing the min/max extents of the axis-aligned volume, ie. [xmin, ymin,zmin,xmax,ymax, zmax].
When the Scene has no content, will be [-100,-100,-100,100,100,100].
Gets the World-space 3D center of this Scene.
When Scene.passes is greater than 1, indicates whether or not to clear the canvas before each pass (true) or just before the first pass (false).
Default value is false.
When Scene.passes is greater than 1, indicates whether or not to clear the canvas before each pass (true) or just before the first pass (false).
Default value is false.
Gets the IDs of the Entitys in Scene.colorizedObjects.
Map of currently colorized Entitys that represent objects.
An Entity represents an object if Entity.isObject is true.
Gets the default EdgeMaterial for this Scene.
Has EdgeMaterial.id set to "default.edgeMaterial".
Meshs in this Scene have Mesh.edgeMaterial set to this EdgeMaterial by default.
Meshs have their edges emphasized while Mesh.edges is true.
Whether Entity.offset is enabled.
This is set via the Viewer constructor and is false by default.
True if Entity.offset is enabled.
Gets the gamma factor to use when Scene.gammaOutput is set true.
Default value is 2.2.
Sets the gamma factor to use when Scene.gammaOutput is set true.
Default value is 2.2.
Gets whether or not Scene should expect all {@link Texture}s and colors to have pre-multiplied gamma.
Default value is false.
Sets whether or not Scene should expect all {@link Texture}s and colors to have pre-multiplied gamma.
Default value is false.
Gets whether or not to render pixels with pre-multiplied gama.
Default value is true.
Sets whether or not to render pixels with pre-multiplied gama.
Default value is false.
Gets the default {@link Geometry} for this Scene, which is a ReadableGeometry with a unit-sized box shape.
Has ReadableGeometry.id set to "default.geometry".
Meshs in this Scene have Mesh.geometry set to this ReadableGeometry by default.
Gets the default highlight EmphasisMaterial for this Scene.
Has EmphasisMaterial.id set to "default.highlightMaterial".
Meshs in this Scene have Mesh.highlightMaterial set to this EmphasisMaterial by default.
Meshs are highlighted while Mesh.highlighted is true.
Gets the IDs of the Entitys in Scene.highlightedObjects.
Map of currently highlighted Entitys that represent objects.
An Entity represents an object if Entity.isObject is true is true, and is highlighted when Entity.highlighted is true.
Gets the LinesMaterial for this Scene.
Whether logarithmic depth buffer is enabled.
This is set via the Viewer constructor and is false by default.
True if logarithmic depth buffer is enabled.
Gets the default Material for this Scene, which is a PhongMaterial.
Has PhongMaterial.id set to "default.material".
Meshs in this Scene have Mesh.material set to this PhongMaterial by default.
Gets the IDs of the Entitys in Scene.models.
Map of Entitys that represent models.
Each Entity is mapped here by Entity.id when Entity.isModel is true.
Gets the number of Entitys in Scene.colorizedObjects.
Gets the number of Entitys in Scene.highlightedObjects.
Gets the number of Entitys in Scene.objects.
Gets the number of Entitys in Scene.selectedObjects.
Gets the number of Entitys in Scene.visibleObjects.
Gets the number of Entitys in Scene.xrayedObjects.
Gets the IDs of the Entitys in Scene.objects.
Map of Entitys that represents objects.
Each Entity is mapped here by Entity.id when Entity.isObject is true.
Gets the IDs of the Entitys in Scene.offsetObjects.
Map of Entitys that represent objects whose Entity.offsets were updated.
An Entity represents an object if Entity.isObject is true.
Gets the IDs of the Entitys in Scene.opacityObjects.
Map of Entitys that represent objects whose opacity was updated.
An Entity represents an object if Entity.isObject is true.
Gets the number of times this Scene renders per frame.
Default value is 1.
Sets the number of times this Scene renders per frame.
Default value is 1.
Gets whether quality rendering is enabled.
Default is false.
True if quality rendering is enabled.
Sets whether physically-based rendering is enabled.
Whether precision surface picking is enabled.
This is set via the Viewer constructor and is false by default.
The pickSurfacePrecision option for Scene.pick only works if this is set true.
Note that when true, this configuration will increase the amount of browser memory used by the Viewer.
True if precision picking is enabled.
Gets the PointsMaterial for this Scene.
Gets the default selection EmphasisMaterial for this Scene.
Has EmphasisMaterial.id set to "default.selectedMaterial".
Meshs in this Scene have Mesh.highlightMaterial set to this EmphasisMaterial by default.
Meshs are highlighted while Mesh.highlighted is true.
Gets the IDs of the Entitys in Scene.selectedObjects.
Map of currently selected Entitys that represent objects.
An Entity represents an object if Entity.isObject is true, and is selected while Entity.selected is true.
The epoch time (in milliseconds since 1970) when this Scene was instantiated.
Gets the number of "ticks" that happen between each render of this Scene.
Default value is 1.
Sets the number of "ticks" that happen between occlusion testing for Markers.
Default value is 20.
Gets the number of "ticks" that happen between each render or this Scene.
Default value is 1.
Sets the number of "ticks" that happen between each render or this Scene.
Default value is 1.
Gets the IDs of the Entitys in Scene.visibleObjects.
Map of currently visible Entitys that represent objects.
An Entity represents an object if Entity.isObject is true, and is visible when Entity.visible is true.
Gets the default xraying EmphasisMaterial for this Scene.
Has EmphasisMaterial.id set to "default.xrayMaterial".
Meshs in this Scene have Mesh.xrayMaterial set to this EmphasisMaterial by default.
Meshs are xrayed while Mesh.xrayed is true.
Gets the IDs of the Entitys in Scene.xrayedObjects.
Map of currently xrayed Entitys that represent objects.
An Entity represents an object if Entity.isObject is true, and is xrayed when Entity.xrayed is true.
Destroys all non-default Components in this Scene.
Destroys all {@link Light}s in this Scene..
Destroys all SectionPlanes in this Scene.
Destroys this Scene.
Sets each Marker.visible true if the Marker is currently not occluded by any opaque Entitys
in the Scene, or false if an Entity is occluding it.
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
Gets the collective axis-aligned boundary (AABB) of a batch of Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Each Entity on which Entity.isObject is registered by Entity.id in Scene.visibleObjects.
Each Entity is only included in the AABB when Entity.collidable is true.
Array of Entity.id values.
An axis-aligned World-space bounding box, given as elements [xmin, ymin, zmin, xmax, ymax, zmax].
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 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
Attempts to pick an Entity in this Scene.
Picking parameters.
Holds results of the pick attempt, returned when an Entity is picked, else null. See method comments for description.
Renders a single frame of this Scene.
The Scene will periodically render itself after any updates, but you can call this method to force a render if required.
Batch-updates Entity.collidable on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Whether or not to set collidable.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.colorize on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
True if any Entitys changed opacity, else false if all updates were redundant and not applied.
Batch-updates Entity.culled on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Whether or not to cull.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.edges on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Whether or not to show edges.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.highlighted on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Each Entity on which both Entity.isObject and Entity.highlighted are true is
registered by Entity.id in Scene.highlightedObjects.
Array of Entity.id values.
Whether or not to highlight.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.offset on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Batch-updates Entity.opacity on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
True if any Entitys changed opacity, else false if all updates were redundant and not applied.
Batch-updates Entity.pickable on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Whether or not to set pickable.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.selected on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Each Entity on which both Entity.isObject and Entity.selected are true is
registered by Entity.id in Scene.selectedObjects.
Array of Entity.id values.
Whether or not to select.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.visible on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Each Entity on which both Entity.isObject and Entity.visible are true is
registered by Entity.id in Scene.visibleObjects.
Array of Entity.id values.
Whether or not to set visible.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Batch-updates Entity.xrayed on Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
Array of Entity.id values.
Whether or not to xray.
True if any Entitys were updated, else false if all updates were redundant and not applied.
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
Iterates with a callback over Entitys that represent objects.
An Entity represents an object when Entity.isObject is true.
True if any Entitys were updated, else false if all updates were redundant and not applied.
Generated using TypeDoc
Fires when a model is loaded