API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSpritesheet
Slices a single Texture into named frames and optional named animation sequences. Each frame is stored as both a Rectangle (the pixel region) and a pre-configured Sprite ready for direct rendering. Animations are ordered lists of frame names that AnimatedSprite.fromSpritesheet consumes to create playback clips.
import { Spritesheet } from '@codexo/exojs' Slices a single Texture into named frames and optional named animation sequences.
Each frame is stored as both a Rectangle (the pixel region) and a pre-configured Sprite ready for direct rendering. Animations are ordered lists of frame names that AnimatedSprite.fromSpritesheet consumes to create playback clips.
new(texture: Texture, data: SpritesheetData): Spritesheet addFrame(name: string, data: SpritesheetFrame): void clear(): this defineAnimation(name: string, frameNames: readonly string[]): this destroy(): void getAnimationFrameNames(name: string): readonly string[] getFrame(name: string): Rectangle getFrameSprite(name: string): Sprite parse(data: SpritesheetData, keepFrames: boolean): void animations: Map<string, readonly string[]> frames: Map<string, Rectangle> sprites: Map<string, Sprite> texture: Texture