Class: CustomAnimationHelper
Extra-Helpers.CustomAnimationHelper
AnimationHelper is a helper class used by AnimationHelperPlugin that allows the extraction of all the animation clips and bind it with AnimationMixer For internal use only at the moment.
Constructors
constructor
• new CustomAnimationHelper()
Properties
mixer
• mixer: AnimationMixer
Animation mixer for a 3D model
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:12
Methods
loadModel
▸ loadModel(model
): void
Loads the model in the helper
Parameters
Name | Type | Description |
---|---|---|
model | Object3D <Event , string > | 3D model to use |
Returns
void
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:23
playAllAnimations
▸ playAllAnimations(loop
): Promise
<void
>
Plays all the animation clips that are present in the 3D model
Parameters
Name | Type | Description |
---|---|---|
loop | boolean | default is 'false', if the clip needs to be looped continously then set it to 'true' |
Returns
Promise
<void
>
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:47
reverseAllAnimation
▸ reverseAllAnimation(loop
): Promise
<void
>
Reverses all the animation clips that are present in the 3D model
Parameters
Name | Type | Description |
---|---|---|
loop | boolean | default is 'false', if the clip needs to be looped continously then set it to 'true' |
Returns
Promise
<void
>
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:63
playClip
▸ playClip(clip
, loop
, timescale?
, reverse?
, resetTime?
): Promise
<void
>
Plays the single clip from the Helper of a 3D model
Parameters
Name | Type | Default value | Description |
---|---|---|---|
clip | AnimationClip | undefined | Animation Clip of the 3D model that needs to be played |
loop | boolean | undefined | default is 'false', if the clip needs to be looped continously then set it to 'true' |
timescale | number | 1 | timescale of the animation clip that will played. Default is 1 |
reverse | boolean | false | to reverse the clip set it to true. Default is false |
resetTime | boolean | false | resets the mixer time. Default is false |
Returns
Promise
<void
>
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:82
playClipByName
▸ playClipByName(name
, loop
, timescale?
, reverse?
): void
Plays the clip by its name from the Helper of a 3D model
Parameters
Name | Type | Default value | Description |
---|---|---|---|
name | string | undefined | name of the animation clip that is present in 3D model |
loop | false | undefined | default is 'false', if the clip needs to be looped continously then set it to 'true' |
timescale | number | 1 | timescale of the animation clip that will played. Default is 1 |
reverse | boolean | false | to reverse the clip set it to true. Default is false |
Returns
void
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:134
update
▸ update(): boolean
Update loop to update the mixer
Returns
boolean
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:148
Accessors
getMixer
• get
getMixer(): AnimationMixer
Returns mixer of the model
Returns
AnimationMixer
Defined in
webgi/src/helpers/threejs/CustomAnimationHelper.ts:32
getAnimationClips
• get
getAnimationClips(): AnimationClip
[]
Returns animation clips of the model
Returns
AnimationClip
[]