Class AnimationGroup
Hierarchy
- AnimationGroup
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Instantiates a new Animation Group. This helps managing several animations at once.
Parameters
-
name: string
Defines the name of the group
-
Optional scene: Nullable<Scene>
Defines the scene the group belongs to
Returns AnimationGroup
-
Properties
nameSearch playground for name
The name of the animation group
on Animation End ObservableSearch playground for onAnimationEndObservable
This observable will notify when one animation have ended
on Animation Group End ObservableSearch playground for onAnimationGroupEndObservable
This observable will notify when all animations have ended.
on Animation Group Loop ObservableSearch playground for onAnimationGroupLoopObservable
Observer raised when all animations have looped
on Animation Group Pause ObservableSearch playground for onAnimationGroupPauseObservable
This observable will notify when all animations have paused.
on Animation Group Play ObservableSearch playground for onAnimationGroupPlayObservable
This observable will notify when all animations are playing.
on Animation Loop ObservableSearch playground for onAnimationLoopObservable
Observer raised when one animation loops
unique IdSearch playground for uniqueId
Gets or sets the unique id of the node
Accessors
animatables
-
returning the list of animatables controlled by this animation group.
Returns Array<Animatable>
children
-
Gets the list of target animations
Returns TargetedAnimation[]
from
-
Gets the first frame
Returns number
is Additive
-
Gets or sets if all animations should be evaluated additively
Returns boolean
-
Gets or sets if all animations should be evaluated additively
Parameters
-
value: boolean
Returns any
-
is Playing
-
Gets a value indicating that the current group is playing
Returns boolean
is Started
-
Define if the animations are started
Returns boolean
loop Animation
-
Gets or sets if all animations should loop or not
Returns boolean
-
Gets or sets if all animations should loop or not
Parameters
-
value: boolean
Returns any
-
speed Ratio
-
Gets or sets the speed ratio to use for all animations
Returns number
-
Gets or sets the speed ratio to use for all animations
Parameters
-
value: number
Returns any
-
targeted Animations
-
Gets the targeted animations for this animation group
Returns Array<TargetedAnimation>
to
-
Gets the last frame
Returns number
Methods
add Targeted AnimationSearch playground for addTargetedAnimation
-
Add an animation (with its target) in the group
Parameters
-
animation: Animation
defines the animation we want to add
-
target: any
defines the target of the animation
Returns TargetedAnimation
the TargetedAnimation object
-
cloneSearch playground for clone
-
Clone the current animation group and returns a copy
Parameters
-
newName: string
defines the name of the new group
-
Optional targetConverter: (oldTarget: any) => any
defines an optional function used to convert current animation targets to new ones
-
-
Parameters
-
oldTarget: any
Returns any
-
-
-
Returns AnimationGroup
the new aniamtion group
-
disposeSearch playground for dispose
-
Dispose all associated resources
Returns void
get Class NameSearch playground for getClassName
-
Returns the string "AnimationGroup"
Returns string
"AnimationGroup"
go ToFrameSearch playground for goToFrame
-
Goes to a specific frame in this animation group
Parameters
-
frame: number
the frame number to go to
Returns AnimationGroup
the animationGroup
-
normalizeSearch playground for normalize
-
This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame It can add constant keys at begin or end
Parameters
-
Optional beginFrame: Nullable<number>
defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)
-
Optional endFrame: Nullable<number>
defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)
Returns AnimationGroup
the animation group
-
pauseSearch playground for pause
-
Pause all animations
Returns AnimationGroup
the animation group
playSearch playground for play
-
Play all animations to initial state This function will start() the animations if they were not started or will restart() them if they were paused
Parameters
-
Optional loop: boolean
defines if animations must loop
Returns AnimationGroup
the animation group
-
resetSearch playground for reset
-
Reset all animations to initial state
Returns AnimationGroup
the animation group
restartSearch playground for restart
-
Restart animations from key 0
Returns AnimationGroup
the animation group
serializeSearch playground for serialize
-
Serializes the animationGroup to an object
Returns any
Serialized object
set Weight For All AnimatablesSearch playground for setWeightForAllAnimatables
-
Set animation weight for all animatables
Parameters
-
weight: number
defines the weight to use
Returns AnimationGroup
the animationGroup
-
startSearch playground for start
-
Start all animations on given targets
Parameters
-
Optional loop: boolean
defines if animations must loop
-
Optional speedRatio: number
defines the ratio to apply to animation speed (1 by default)
-
Optional from: number
defines the from key (optional)
-
Optional to: number
defines the to key (optional)
-
Optional isAdditive: boolean
defines the additive state for the resulting animatables (optional)
Returns AnimationGroup
the current animation group
-
stopSearch playground for stop
-
Stop all animations
Returns AnimationGroup
the animation group
sync All Animations WithSearch playground for syncAllAnimationsWith
-
Synchronize and normalize all animatables with a source animatable
Parameters
-
root: Animatable
defines the root animatable to synchronize with
Returns AnimationGroup
the animationGroup
-
to StringSearch playground for toString
-
Creates a detailled string about the object
Parameters
-
Optional fullDetails: boolean
defines if the output string will support multiple levels of logging within scene loading
Returns string
a string representing the object
-
Static Make Animation AdditiveSearch playground for MakeAnimationAdditive
-
Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.
Parameters
-
sourceAnimationGroup: AnimationGroup
defines the AnimationGroup containing animations to convert
-
Optional referenceFrame: number
defines the frame that keyframes in the range will be relative to
-
Optional range: string
defines the name of the AnimationRange belonging to the animations in the group to convert
-
Optional cloneOriginal: boolean
defines whether or not to clone the group and convert the clone or convert the original group (default is false)
-
Optional clonedName: string
defines the name of the resulting cloned AnimationGroup if cloneOriginal is true
Returns AnimationGroup
a new AnimationGroup if cloneOriginal is true or the original AnimationGroup if cloneOriginal is false
-
Static ParseSearch playground for Parse
-
Returns a new AnimationGroup object parsed from the source provided.
Parameters
-
parsedAnimationGroup: any
defines the source
-
scene: Scene
defines the scene that will receive the animationGroup
Returns AnimationGroup
a new AnimationGroup
-
Use this class to create coordinated animations on multiple targets