Class: GLTFAnimationPlugin
Plugins.GLTFAnimationPlugin
Hierarchy
AViewerPlugin
<"checkpointEnd"
|"checkpointBegin"
|"animationStep"
>↳
GLTFAnimationPlugin
Properties
PluginType
▪ Static
Readonly
PluginType: "GLTFAnimation"
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:30
AnimationMarkersExtension
▪ Static
Readonly
AnimationMarkersExtension: "WEBGI_animation_markers"
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:544
enabled
• enabled: boolean
= true
Overrides
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:28
autoIncrementTime
• autoIncrementTime: boolean
= true
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)
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:38
animations
• Readonly
animations: { mixer
: AnimationMixer
; clips
: AnimationClip
[] ; actions
: AnimationAction
[] ; duration
: number
}[] = []
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:54
loopAnimations
• loopAnimations: boolean
= true
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:59
loopRepetitions
• loopRepetitions: number
= Infinity
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:62
timeScale
• timeScale: number
= 1
Timescale for the animation. (not individual actions) If set to 0, it will be ignored.
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:69
animationSpeed
• animationSpeed: number
= 1
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:77
animateOnScroll
• animateOnScroll: boolean
= false
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:79
scrollAnimationDamping
• scrollAnimationDamping: number
= 0.1
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:81
animateOnDrag
• animateOnDrag: boolean
= false
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:83
dragAxis
• dragAxis: "x"
| "y"
= 'y'
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:86
autoplayOnLoad
• autoplayOnLoad: boolean
= false
If true, the animation will be played automatically when the model(any model with animations) is loaded.
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:91
syncMaxDuration
• syncMaxDuration: boolean
= false
Sync the duration of all clips based on the max duration, helpful for things like timeline markers
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:96
dragAnimationDamping
• dragAnimationDamping: number
= 0.3
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:99
dependencies
• dependencies: typeof AssetManagerPlugin
[]
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:101
uiConfig
• Optional
uiConfig: UiObjectConfig
<any
, string
> = undefined
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:371
timelineMarkers
• timelineMarkers: any
[] = []
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:545
_dirty
• Protected
_dirty: boolean
= false
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:23
_viewer
• Protected
Optional
_viewer: ViewerApp
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:27
_animationState
• Protected
_animationState: "playing"
| "stopped"
| "paused"
| "none"
= 'none'
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:359
Accessors
dirty
• get
dirty(): boolean
Returns
boolean
Inherited from
AViewerPlugin.dirty
Defined in
webgi/src/core/AViewerPlugin.ts:16
• set
dirty(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
AViewerPlugin.dirty
Defined in
webgi/src/core/AViewerPlugin.ts:20
viewer
• get
viewer(): undefined
| TViewer
Returns
undefined
| TViewer
Inherited from
AViewerPlugin.viewer
Defined in
webgi/src/core/AViewerPlugin.ts:29
animationState
• get
animationState(): "playing"
| "stopped"
| "paused"
| "none"
Returns
"playing"
| "stopped"
| "paused"
| "none"
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:40
animationTime
• get
animationTime(): number
Returns
number
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:43
animationDuration
• get
animationDuration(): number
Returns
number
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:46
Methods
onDispose
▸ onDispose(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:40
toJSON
▸ toJSON(meta?
): any
Parameters
Name | Type |
---|---|
meta? | any |
Returns
any
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:49
fromJSON
▸ fromJSON(data
, meta?
): null
| GLTFAnimationPlugin
| Promise
<null
| GLTFAnimationPlugin
>
Parameters
Name | Type |
---|---|
data | any |
meta? | any |
Returns
null
| GLTFAnimationPlugin
| Promise
<null
| GLTFAnimationPlugin
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:56
exportState
▸ exportState(): any
Returns
any
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:68
importState
▸ importState(state
): Promise
<void
>
Parameters
Name | Type |
---|---|
state | any |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:71
storeState
▸ storeState(prefix?
, storage?
, data?
): void
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
data? | any |
Returns
void
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:78
loadState
▸ loadState(prefix?
, storage?
): Promise
<void
>
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:88
setTime
▸ setTime(time
): void
Parameters
Name | Type |
---|---|
time | number |
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:50
onAdded
▸ onAdded(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Overrides
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:304
onRemove
▸ onRemove(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Overrides
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:344
onStateChange
▸ onStateChange(): void
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:368
playPauseAnimation
▸ playPauseAnimation(): void
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:377
playClip
▸ playClip(name
, resetOnEnd?
): Promise
<void
>
This will play a single clip by name It might reset all other animations, this is a bug; https://codepen.io/repalash/pen/mdjgpvx
Parameters
Name | Type | Default value |
---|---|---|
name | string | undefined |
resetOnEnd | boolean | false |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:387
playClips
▸ playClips(names
, resetOnEnd?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
names | string [] | undefined |
resetOnEnd | boolean | false |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:390
playAnimation
▸ playAnimation(resetOnEnd?
, animations?
): Promise
<void
>
Starts all the animations and returns a promise that resolves when all animations are done.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
resetOnEnd | boolean | false | if true, will reset the animation to the start position when it ends. |
animations? | AnimationAction [] | undefined | 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. |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:410
pauseAnimation
▸ pauseAnimation(): void
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:494
resumeAnimation
▸ resumeAnimation(): void
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:504
stopAnimation
▸ stopAnimation(reset?
): void
Parameters
Name | Type | Default value |
---|---|---|
reset | boolean | false |
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:515
resetAnimation
▸ resetAnimation(): void
Returns
void
Defined in
webgi/src/plugins/GLTFAnimationPlugin.ts:530
_storeKey
▸ Protected
_storeKey(prefix?
): string
Parameters
Name | Type |
---|---|
prefix? | string |
Returns
string
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:64
Constructors
constructor
• new GLTFAnimationPlugin()