AnimationGroup

Use this class to create coordinated animations on multiple targets

Hierarchy

  • AnimationGroup

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

animatables

Find examples in Playground
animatables: Array<Animatable>

returning the list of animatables controlled by this animation group.

from

Find examples in Playground
from: number

Gets the first frame

isPlaying

Find examples in Playground
isPlaying: boolean

Gets a value indicating that the current group is playing

isStarted

Find examples in Playground
isStarted: boolean

Define if the animations are started

name

Find examples in Playground
name: string

The name of the animation group

onAnimationEndObservable

Find examples in Playground
onAnimationEndObservable: Observable<TargetedAnimation>

This observable will notify when one animation have ended.

onAnimationGroupEndObservable

Find examples in Playground
onAnimationGroupEndObservable: Observable<AnimationGroup>

This observable will notify when all animations have ended.

onAnimationGroupPauseObservable

Find examples in Playground
onAnimationGroupPauseObservable: Observable<AnimationGroup>

This observable will notify when all animations have paused.

onAnimationGroupPlayObservable

Find examples in Playground
onAnimationGroupPlayObservable: Observable<AnimationGroup>

This observable will notify when all animations are playing.

speedRatio

Find examples in Playground
speedRatio: number

Gets or sets the speed ratio to use for all animations

targetedAnimations

Find examples in Playground
targetedAnimations: Array<TargetedAnimation>

Gets the targeted animations for this animation group

to

Find examples in Playground
to: number

Gets the last frame

uniqueId

Find examples in Playground
uniqueId: number

Gets or sets the unique id of the node

Methods

addTargetedAnimation

Find examples in Playground
  • 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

dispose

Find examples in Playground
  • dispose(): void

getClassName

Find examples in Playground
  • getClassName(): string
  • Returns the string "AnimationGroup"

    Returns string

    "AnimationGroup"

goToFrame

Find examples in Playground
  • Goes to a specific frame in this animation group

    Parameters

    • frame: number

      the frame number to go to

    Returns AnimationGroup

    the animationGroup

normalize

Find examples in Playground
  • 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

pause

Find examples in Playground

play

Find examples in Playground
  • 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

reset

Find examples in Playground
  • Reset all animations to initial state

    Returns AnimationGroup

    the animation group

restart

Find examples in Playground
  • Restart animations from key 0

    Returns AnimationGroup

    the animation group

setWeightForAllAnimatables

Find examples in Playground

start

Find examples in Playground
  • start(loop?: boolean, speedRatio?: number, from?: number, to?: number): AnimationGroup
  • 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)

    Returns AnimationGroup

    the current animation group

stop

Find examples in Playground

syncAllAnimationsWith

Find examples in Playground

toString

Find examples in Playground
  • toString(fullDetails?: boolean): string
  • 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 Parse

Find examples in Playground
  • 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

Generated using TypeDoc