Animation
Class | Type | Name | Interface Description |
---|---|---|---|
Animation:AOobject | Variables | duration:number (read-only) | Total duration of animation resources (seconds) |
frameCount: number (read-only) | Total frame number of the animation (When importing an animation, if animation compression is enabled, the frame number after import will be less than that of the original resource. When the frame numbers of each animation track in an animation are different, the maximum value is taken as the animation frame number) | ||
startTime: number | The default start time for animation playback (used to extract a specific segment from an animation resource for playback) | ||
endTime: number | Default end time for animation playback (used to extract a specific segment from an animation resource for playback) | ||
wrapMode:AnimationWrapMode | Default playback mode of the animation | ||
speed:number | Default playback speed of the animation |
Examples
duration:number (read-only)
const duration = animation.duration;
frameCount: number (read-only)
const count = animation.frameCount;
startTime: number
const startTimeOut = animation.startTime;
endTime: number
const endTimeOut = animation.endTime;
wrapMode:AnimationWrapMode
animation.wrapMode = APJS.AnimationWrapMode.Once
speed:number
animation.speed = 1.5;
Class | Type | Name | Interface Description |
---|---|---|---|
AnimationWrapMode | Enum | Once, | • Stop after playing once |
Repeat, | • Loop Playback | ||
PingPong, | • Play back and forth | ||
ClampForever | • After playing once, it will always stay on the last frame (the animation will not end) |