Documentation / scene / PlayAnimationOptions
Type Alias: PlayAnimationOptions
PlayAnimationOptions =
object
Defined in: libs/scene/src/animation/animationset.ts:77
Options for playing an animation.
Controls looping, playback speed (including reverse), and fade-in blending.
Properties
repeat?
optionalrepeat?:number
Defined in: libs/scene/src/animation/animationset.ts:84
Number of loops to play.
- 0: infinite looping (default).
- n > 0: play exactly n loops (each loop is one full duration of the clip).
speedRatio?
optionalspeedRatio?:number
Defined in: libs/scene/src/animation/animationset.ts:92
Playback speed multiplier.
- 1: normal speed (default).
- >1: faster; <1: slower.
- Negative values play the clip in reverse. The initial
currentTimewill be set to the end.
fadeIn?
optionalfadeIn?:number
Defined in: libs/scene/src/animation/animationset.ts:100
Fade-in duration in seconds.
Interpolates the animation weight from 0 to the clip's configured weight over this time. Use together with stopAnimation(..., { fadeOut }) for smooth cross-fading. Default is 0 (no fade-in).
completionFadeOut?
optionalcompletionFadeOut?:number
Defined in: libs/scene/src/animation/animationset.ts:108
Fade-out duration in seconds used after the playback completes naturally.
When greater than 0, the playback emits complete at the authored end time but remains active for this duration while its weight fades to 0. This lets a following playback cross-fade from the completed pose instead of snapping after the completed clip is removed.
weight?
optionalweight?:number
Defined in: libs/scene/src/animation/animationset.ts:115
Weight of the animation clip.
Used during blending when multiple animations affect the same property. Default is the clip's configured weight.
id?
optionalid?:string
Defined in: libs/scene/src/animation/animationset.ts:119
Optional stable playback id. Useful for blueprint/editor references.
layer?
optionallayer?:string
Defined in: libs/scene/src/animation/animationset.ts:123
Logical layer/channel name used by higher-level controllers.
priority?
optionalpriority?:number
Defined in: libs/scene/src/animation/animationset.ts:127
Priority used by higher-level interrupt policies.
interruptible?
optionalinterruptible?:boolean
Defined in: libs/scene/src/animation/animationset.ts:131
Whether higher-level controllers may interrupt this playback.
range?
optionalrange?:object
Defined in: libs/scene/src/animation/animationset.ts:135
Optional sub-range to play.
start?
optionalstart?:AnimationTimeRef
end?
optionalend?:AnimationTimeRef
sync?
optionalsync?:AnimationPlaybackSyncOptions
Defined in: libs/scene/src/animation/animationset.ts:146
Optional phase synchronization source used to choose the initial playback time.
When omitted, playback starts at the range start (or clip start), and reverse playback starts at the range end (or clip end). When set, the new playback starts at the phase copied from the referenced active playback.