Protected
Readonly
_Protected
_Protected
_Protected
_Protected
Optional
_Protected
_Automatically track drag events in either x or y axes to seek animations Control axis with dragAxis and damping/smoothness with dragAnimationDamping
Automatically track scroll event in window and use window.scrollY
along with pageScrollHeight to seek animations
Control damping/smoothness with pageScrollAnimationDamping
See also animateOnDrag, animateOnScroll
Automatically track mouse wheel events to seek animations Control damping/smoothness with scrollAnimationDamping See also animateOnPageScroll. animateOnDrag
Speed of the animation. (not individual actions) This can be set to 0.
If true, the animation time will be automatically incremented by the time delta, otherwise it has to be set manually between 0 and the animationDuration using setTime
. (default: true)
Set it to false when controlling the time manually like when using the timeline or other custom controls.
Note that this is not serialized, so it will not be saved in the scene file and must be set manually in the code.
If true, the animation will be played automatically when the model(any model with animations) is loaded.
Force (not serialized) version of autoplayOnLoad, this will play the animation even if it autoplayOnLoad is disabled inside the saved file.
Damping for the drag animation, when animateOnDrag is true.
Axis to track for drag events, when animateOnDrag is true.
x
will track horizontal drag, y
will track vertical drag.
Loop the complete animation. All actions are looped either individually or together based on syncMaxDuration. This happens loopRepetitions times.
Note - only applicable when autoIncrementTime is true.
Number of times to loop the animation. (not individual actions) Only applicable when loopAnimations is true.
Damping for the scroll animation, when animateOnPageScroll is true.
Damping for the scroll animation, when animateOnScroll is true.
If true, will stop the animation when the animation ends. (when not looping)
Sync the duration of all clips based on the max duration, helpful for things like timeline markers
Timescale for the animation. (not individual actions) If set to 0, it will be ignored.
Static
Optional
Readonly
OldStatic
Readonly
PluginGet the current animation duration (max of all animations). (read only)
List of GLTF animations loaded with the models. The animations are standard threejs AnimationClip and their AnimationAction. Each set of actions also has a mixer.
Get the current state of the animation. (read only) use playAnimation, pauseAnimation, stopAnimation to change the state.
Get the current animation time. (read only) The time is managed automatically. To manage the time manually set autoIncrementTime to false and use setTime to change the time.
Protected
_Protected
_Protected
_Optional
prefix: stringOptional
meta: SerializationMetaTypeStarts all the animations and returns a promise that resolves when all animations are done.
if true, will reset the animation to the start position when it ends.
Optional
animations: AnimationAction[]play specific animations, otherwise play all animations. Note: the promise returned (if this is set) from this will resolve before time if the animations was ever paused, or converged mode is on in recorder.
This will play a single clip by name It might reset all other animations, this is a bug; https://codepen.io/repalash/pen/mdjgpvx
Optional
setOptional
meta: SerializationMetaType
Manages playback of GLTF animations.
The GLTF animations can be created in any 3d software that supports GLTF export like Blender. If animations from multiple files are loaded, they will be merged in a single root object and played together.
The time playback is managed automatically, but can be controlled manually by setting autoIncrementTime to false and using setTime to set the time.
This plugin is made for playing, pausing, stopping, all the animations at once, while it is possible to play individual animations, it is not recommended.
To play individual animations, with custom choreography, use the GLTFAnimationPlugin.animations property to get reference to the animation clips and actions. Create your own mixers and control the animation playback like in three.js