AnimateComp
:The animate component.
animate
(name: string, keys: T[], opts: AnimateOpt): voidAnimates a property on this object.
param name- Name of the property to animate.
param keys- Keys determining the value at a certain point in time.
param opts- Options.
unanimate
(name: string): voidRemoves the animation from the given property.
param name- Name of the property to remove the animation from.
unanimateAll
(): voidRemoves the animations from all properties
onAnimateFinished
(cb: () => void): KEventControllerAttaches an event handler which is called when all the animation channels have finished.
param cb- The event handler called when the animation finishes.
onAnimateChannelFinished
(cb: (name: string) => void): KEventControllerAttaches an event handler which is called when an animation channels has finished.
param cb- The event handler called when an animation channel finishes.
base
: BaseValuesBase values for relative animation
animation
: {paused
: booleanPauses playing
seek
(time: number): voidMove the animation to a specific point in time
param time- Time to move the animation to in seconds
duration
: numberReturns the duration of the animation
get
(name: string): AnimReturns the animation with the specified name
param name- Name of the animation to retrieve
play
(name: string): voidPlay the animation with the specified name
param name
stop
(): voidStop playing the current animation
serializeAnimations
(): Record<string, AnimationChannels>Serializes the animation of this object to plain Javascript types
serializeAnimationOptions
(): {followMotion
?: booleanrelative
?: booleanSerializes the options of this object to plain Javascript types