Skip to content

Function: BuildSpriteFrameClipsFromSheet() ​

ts
function BuildSpriteFrameClipsFromSheet(
   loader, 
   sheetAssetId, 
   options
): AnimationClip[];

Builds every clip a spritesheet declares. Source priority:

  1. The sheet JSON's TexturePacker animations block.
  2. Fallback: group frame ids by filename prefix (walk_01, walk_02 → 'walk').

Duration priority per clip: perClip.duration > perClip.fps > options.duration > options.fps. A clip with none of those resolved is skipped with a warning.

Parameters ​

ParameterType
loaderIAssetLoader
sheetAssetIdstring
optionsBuildSpriteFrameClipsFromSheetOptions

Returns ​

AnimationClip[]

© 2026 PlayAdGentic