Skip to main content

AnimatedTextureProvider

APJS Script API reference for the AnimatedTextureProvider class.

TypeNameInterface Description
Variablesduration: number

Function: Gets the duration of the animation in seconds.

Variablesfps: number

Function: Gets the frames per second (fps) of the animation.

VariablesloopCount: number

Function: Gets the number of times the animation should loop.

VariablesplayMode: AnimatedTexturePlayMode

Function: Gets or sets the play mode of the animation.

Variablesreverse: boolean

Function: Gets whether the animation plays in reverse.

Returns True if animation plays in reverse, false otherwise

FunctionsgetCurrentPlayingFrame(): number

Function: Get current playing frame index, the index range from 0 to frameCount - 1

Returns Current frame index

FunctionsgetFrameCount(): number

Function: Gets the total number of frames in the animation sequence.

Returns Total frame count

Functionspause(): void

Function: Pauses animation playback.

Functionsplay(): void

Function: Starts the animation playback.

FunctionsplayFromTo(from: number, to: number): void

Function: reset and set the start and end index of the animation. The index range from 0 to frameCount - 1.

Parameters

from: - start index of the animation

to: - end index of the animation

Functionsreset(): void

Function: Resets the animation to its initial state and restarts playback.

Functionsresume(): void

Function: Resumes the animation playback.

Functionsstop(): void

Function: Stops animation playback, resets to initial state, and displays the first frame.

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use AnimatedTextureProvider here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies