Function AnimationCreateAndStartHierarchyAnimation
-
AnimationCreateAndStartHierarchyAnimation(
name: string,
node: Node,
directDescendantsOnly: boolean,
targetProperty: string,
framePerSecond: number,
totalFrame: number,
from: any,
to: any,
loopMode?: number,
easingFunction?: EasingFunction,
onAnimationEnd?: () => void,
): Nullable<Animatable[]>Parameters
- name: string
defines the name of the global animation that will be run on all nodes
- node: Node
defines the root node where the animation will take place
- directDescendantsOnly: boolean
if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used
- targetProperty: string
defines property to animate
- framePerSecond: number
defines the number of frame per second to use
- totalFrame: number
defines the number of frames in total
- from: any
defines the initial value
- to: any
defines the final value
OptionalloopMode: numberdefines which loop mode you want to use (off by default)
OptionaleasingFunction: EasingFunctiondefines the easing function to use (linear by default)
OptionalonAnimationEnd: () => voiddefines the callback to call when an animation ends (will be called once per node)
Returns Nullable<Animatable[]>
the list of animatables created for all nodes
- name: string
Create and start an animation on a node and its descendants