ModelComponent class
Model component, used to display gltf 3D models in the game (.gltf, .glb)
See ModelComponentData for the data schema used to create a model component
Signature:
export declare class ModelComponent extends Component3D<ModelComponentData>
Extends: Component3D<ModelComponentData>
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ModelComponent
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
boolean |
Enable the animation system for this model. Defaults to false, works only on model that embeds animations | ||
|
any | ||
number |
Set the opacity of the model. Defaults to 1 | ||
RenderMode |
Model render mode. Defaults to "default" |
Methods
Method |
Modifiers |
Description |
---|---|---|
| ||
Get the animation data of the 3D model | ||
| ||
Play an animation on the 3D model. This applies only to animated gltf models containing animations. | ||
Set the time of an animation on the 3D model | ||
Stop an animation on the 3D model | ||
Stop all animations on the 3D model |