Function AnimationCreateAndStartAnimation
-
AnimationCreateAndStartAnimation(
name: string,
target: any,
targetProperty: string,
framePerSecond: number,
totalFrame: number,
from: any,
to: any,
loopMode?: number,
easingFunction?: EasingFunction,
onAnimationEnd?: () => void,
scene?: Scene,
): Nullable<Animatable>Parameters
- name: string
defines the name of the global animation that will be run on all nodes
- target: any
defines the target where the animation will take place
- targetProperty: string
defines property to animate
- framePerSecond: number
defines the number of frame per second yo 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 animation end
Optionalscene: Scenedefines the hosting scene
Returns Nullable<Animatable>
the animatable created for this animation
- name: string
Create and start an animation on a node