GltfModel
ecs.GltfModel
Description
The GltfModel component manages 3D models.
Functions
See component schema.
Schema
Property | Data | Required | Description |
---|---|---|---|
url | string | true | The source url. |
animationClip | string | false | The name of the animationClip attached to the model to play |
loop | Boolean | false | Whether the animation clip restarts after it finishes playing or not |
paused | Boolean | false | Whether the animation clip is paused |
time | number | false | Time in seconds of animationClip to jump to |
timeScale | number | false | Scaling factor for the time. 0 causes the animation to pause. Negative values cause the animation to play backwards. |
collider | boolean | false | Whether the animation should update the physics collider. |
reverse | boolean | false | If set, the animation will play in reverse when it finishes playing forward (together counts as one loop iteration) |
repetitions | number | false | If set along with ‘loop’, the number of times the loop will be repeated (-1 means loop forever) |
crossFadeDuration | number | false | The time in seconds that will be spent blending between animations when a new animation is started (and an existing animation is playing) |