Skip to main content

GifTextureProvider

GIF texture playback provider.

TypeNameInterface Description
Variablesduration: number

Function: Gets the duration of the GIF asset.

Variablesfps: number

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

VariablesloopCount: number

Function: Gets the loop count of the GIF asset.

FunctionsgetCurrentPlayingFrame(): number

Function: Gets the current playing frame index of the GIF asset.

Returns The current playing frame index of the GIF asset.

FunctionsgetFrameCount(): number

Function: Gets the frame count of the GIF asset.

Returns The frame count of the GIF asset.

Functionspause(): void

Function: Pauses the GIF asset.

FunctionsplayFromStart(): void

Function: Plays the GIF asset from the start.

Functionsresume(): void

Function: Resumes the GIF asset.

Functionsseek(frameIndex: number): void

Function: Seeks to the specified frame index.

Parameters

frameIndex: - The index of the frame to seek to.

Use Case

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