Owner component. When destroyed, the owner will destroy this component as well.
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.
ID of the corresponding object within the originating system, if any.
The parent Scene that contains this Component.
The viewer that contains this Scene.
Gets the Mesh's World-space 3D axis-aligned bounding box.
Represented by a six-element Float64Array containing the min/max extents of the
axis-aligned volume, ie. [xmin, ymin,zmin,xmax,ymax, zmax].
Gets the Node's billboarding behaviour.
Options are:
"none" - (default) - No billboarding."spherical" - Mesh is billboarded to face the viewpoint, rotating both vertically and horizontally."cylindrical" - Mesh is billboarded to face the viewpoint, rotating only about its vertically axis. Use this mode for things like trees on a landscape.Gets if this Mesh casts shadows.
Sets if this Mesh casts shadows.
Gets if this Mesh is clippable.
Clipping is done by the SectionPlanes in {@link Scene.sectionPlanes}.
Sets if this Mesh is clippable.
Clipping is done by the SectionPlanes in {@link Scene.sectionPlanes}.
Gets if this Mesh included in boundary calculations.
Sets if this Mesh included in boundary calculations.
Gets the RGB colorize color for this Mesh.
Multiplies by rendered fragment colors.
Each element of the color is in range [0..1].
Sets the RGB colorize color for this Mesh.
Multiplies by rendered fragment colors.
Each element of the color is in range [0..1].
Gets if this Mesh is culled.
Only rendered when Mesh.visible is true and Mesh.culled is false.
Sets if this Mesh is culled.
Only rendered when Mesh.visible is true and Mesh.culled is false.
Defines the appearance of this Mesh when edges are enhanced.
Mesh is xrayed when Mesh.edges is true.
Set to Scene.edgeMaterial by default.
Gets if this Mesh is edge-enhanced.
Edge appearance is configured by the EdgeMaterial referenced by Mesh.edgeMaterial.
Sets if this Mesh is edge-enhanced.
Edge appearance is configured by the EdgeMaterial referenced by Mesh.edgeMaterial.
Defines the shape of this Mesh.
Set to Scene.geometry by default.
Defines the appearance of this Mesh when highlighted.
Mesh is xrayed when Mesh.highlighted is true.
Set to Scene.highlightMaterial by default.
Gets if this Mesh is highlighted.
Highlighted appearance is configured by the EmphasisMaterial referenced by Mesh.highlightMaterial.
When Mesh.isObject and Mesh.highlighted are both true the Mesh will be
registered by Mesh.id in Scene.highlightedObjects.
Sets if this Mesh is highlighted.
Highlighted appearance is configured by the EmphasisMaterial referenced by Mesh.highlightMaterial.
When Mesh.isObject and Mesh.highlighted are both true the Mesh will be
registered by Mesh.id in Scene.highlightedObjects.
Returns true to indicate that Mesh implements {@link Drawable}.
Returns true to indicate that Mesh implements Entity.
Returns true to indicate that this Component is a Mesh.
Returns true if this Mesh represents a model.
When this returns true, the Mesh will be registered by Mesh.id in Scene.models and
may also have a corresponding MetaModel.
Returns true if this Mesh represents an object.
When this returns true, the Mesh will be registered by Mesh.id in Scene.objects and
may also have a corresponding MetaObject.
Property with final value true to indicate that xeokit should render this Mesh in sorted order, relative to other Meshes.
The sort order is determined by Mesh.stateSortCompare.
Sorting is essential for rendering performance, so that xeokit is able to avoid applying runs of the same state changes to the GPU, ie. can collapse them.
Gets the Mesh's rendering order relative to other Meshes.
Default value is 0.
This can be set on multiple transparent Meshes, to make them render in a specific order for correct alpha blending.
Sets the Mesh's rendering order relative to other Meshes.
Default value is 0.
This can be set on multiple transparent Meshes, to make them render in a specific order for correct alpha blending.
Defines the appearance of this Mesh when rendering normally, ie. when not xrayed, highlighted or selected.
Set to Scene.material by default.
Gets the Mesh's local modeling transform matrix.
Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].
Sets the Mesh's local modeling transform matrix.
Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].
The approximate number of triangles in this Mesh.
Gets the Mesh's 3D World-space offset.
Default value is [0,0,0].
Sets the Mesh's 3D World-space offset.
The offset dynamically translates the Mesh in World-space.
Default value is [0, 0, 0].
Provide a null or undefined value to reset to the default value.
Gets the opacity factor for this Mesh.
This is a factor in range [0..1] which multiplies by the rendered fragment alphas.
Sets the opacity factor for this Mesh.
This is a factor in range [0..1] which multiplies by the rendered fragment alphas.
Gets the 3D origin of the Mesh's {@link Geometry}'s vertex positions.
When this is given, then Mesh.matrix, Mesh.position and Mesh.geometry are all assumed to be relative to this center position.
Sets the 3D origin of the Mesh's {@link Geometry}'s vertex positions.
When this is given, then Mesh.matrix, Mesh.position and Mesh.geometry are all assumed to be relative to this center position.
The parent Node.
The parent Node may also be set by passing the Mesh to the parent's Node.addChild method.
Gets if this Mesh is pickable.
Picking is done via calls to Scene.pick.
Sets if this Mesh is pickable.
Picking is done via calls to Scene.pick.
Gets the Mesh's local translation.
Default value is [0,0,0].
Sets the Mesh's local translation.
Default value is [0,0,0].
Gets the Mesh's local rotation quaternion.
Default value is [0,0,0,1].
Sets the Mesh's local rotation quaternion.
Default value is [0,0,0,1].
Gets if this Mesh can have shadows cast upon it.
Sets if this Mesh can have shadows cast upon it.
Gets the Mesh's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
Default value is [0,0,0].
Sets the Mesh's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
Default value is [0,0,0].
Gets the World-space origin for this Mesh.
Deprecated and replaced by Mesh.origin.
Sets the World-space origin for this Mesh.
Deprecated and replaced by Mesh.origin.
Gets if this Mesh can have Scalable Ambient Obscurance (SAO) applied to it.
SAO is configured by {@link SAO}.
Gets the Mesh's local scale.
Default value is [1,1,1].
Sets the Mesh's local scale.
Default value is [1,1,1].
Gets if this Mesh is selected.
Selected appearance is configured by the EmphasisMaterial referenced by Mesh.selectedMaterial.
When Mesh.isObject and Mesh.selected are both ````true``` the Mesh will be registered by Mesh.id in Scene.selectedObjects.
Sets if this Mesh is selected.
Selected appearance is configured by the EmphasisMaterial referenced by Mesh.selectedMaterial.
When Mesh.isObject and Mesh.selected are both ````true``` the Mesh will be registered by Mesh.id in Scene.selectedObjects.
Defines the appearance of this Mesh when selected.
Mesh is xrayed when Mesh.selected is true.
Set to Scene.selectedMaterial by default.
Gets if the Node's position is stationary.
When true, will disable the effect of Camera translations for this Mesh, while still allowing it to rotate. This is useful for skyboxes.
Gets if this Mesh is transparent.
Gets if this Mesh is visible.
Only rendered when Mesh.visible is true and Mesh.culled is false.
When Mesh.isObject and Mesh.visible are both true the Mesh will be
registered by Mesh.id in Scene.visibleObjects.
Sets if this Mesh is visible.
Only rendered when Mesh.visible is true and Mesh.culled is false.
When Mesh.isObject and Mesh.visible are both true the Mesh will be
registered by Mesh.id in Scene.visibleObjects.
Gets the Mesh's World matrix.
Gets the Mesh's World normal matrix.
Defines the appearance of this Mesh when xrayed.
Mesh is xrayed when Mesh.xrayed is true.
Set to Scene.xrayMaterial by default.
Gets if this Mesh is xrayed.
XRayed appearance is configured by the EmphasisMaterial referenced by Mesh.xrayMaterial.
When Mesh.isObject and Mesh.xrayed are both ````true``` the Mesh will be registered by Mesh.id in Scene.xrayedObjects.
Sets if this Mesh is xrayed.
XRayed appearance is configured by the EmphasisMaterial referenced by Mesh.xrayMaterial.
When Mesh.isObject and Mesh.xrayed are both ````true``` the Mesh will be registered by Mesh.id in Scene.xrayedObjects.
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
Rotates the Mesh about the given local axis by the given increment.
Local axis about which to rotate.
Angle increment in degrees.
Rotates the Mesh about the given World-space axis by the given increment.
Local axis about which to rotate.
Angle increment in degrees.
Rotates the Mesh about the local X-axis by the given increment.
Angle increment in degrees.
Rotates the Mesh about the local Y-axis by the given increment.
Angle increment in degrees.
Rotates the Mesh about the local Z-axis by the given increment.
Angle increment in degrees.
Comparison function used by the renderer to determine the order in which xeokit should render the Mesh, relative to to other Meshes.
xeokit requires this method because Mesh implements {@link Drawable}.
Sorting is essential for rendering performance, so that xeokit is able to avoid needlessly applying runs of the same rendering state changes to the GPU, ie. can collapse them.
Translates the Mesh along local space vector by the given increment.
Normalized local space 3D vector along which to translate.
Distance to translate along the vector.
Translates the Mesh along the local X-axis by the given increment.
Distance to translate along the X-axis.
Translates the Mesh along the local Y-axis by the given increment.
Distance to translate along the Y-axis.
Translates the Mesh along the local Z-axis by the given increment.
Distance to translate along the Z-axis.
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
An Entity that is a drawable element, with a {@link Geometry} and a Material, that can be connected into a scene graph using Nodes.