API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceAnimatedSpriteClipDefinition
@codexo/exojs / rendering / stable
Definition for a single animation clip registered on an AnimatedSprite.
5
props
0
methods
0
events
Import
import { AnimatedSpriteClipDefinition } from '@codexo/exojs'Definition for a single animation clip registered on an AnimatedSprite.
Properties5
fps?: numberPer-frame hold duration, indexed the same as frames. When provided it is authoritative for playback timing and fps is ignored while advancing frames (still accepted as a display-only average). Use this to preserve uneven hold-frames - e.g. an Aseprite export where one frame intentionally lingers longer than the rest.
frameOffsets?: readonly { x: number; y: number }[]Per-frame local translation in local (pre-scale) pixels, indexed the same as frames, applied on top of the sprite's own position/origin. Use this to keep frames anchored to a stable point when a source atlas trims frames to different sizes (Aseprite's spriteSourceSize) - without it, differently-trimmed frames would jitter around their own top-left.
repeat?: numberHow many full cycles (advancing through every frame once counts as one cycle) the clip plays before stopping and dispatching onComplete. -1 (the default when omitted) loops indefinitely; 1 plays once; any other positive integer plays exactly that many times. Use this to preserve Aseprite's frame-tag repeat count (e.g. an attack that should play exactly twice, not once or forever).
Source