API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classAsepriteSheet
Parsed representation of an Aseprite JSON sprite sheet export. `AsepriteSheet.parse(data, texture)` converts the raw JSON document into: - A Spritesheet whose frames correspond to the Aseprite frame array (keyed by zero-based index string: `"0"`, `"1"`, ...). - A `clips` map of AnimatedSpriteClipDefinition entries built from `meta.frameTags`, one per named tag. - The `slices` and `layers` metadata maps, carried through verbatim. Call createAnimatedSprite to obtain a ready-to-use AnimatedSprite with all clips pre-registered.
import { AsepriteSheet } from '@codexo/exojs-aseprite'Parsed representation of an Aseprite JSON sprite sheet export.
`AsepriteSheet.parse(data, texture)` converts the raw JSON document into: - A Spritesheet whose frames correspond to the Aseprite frame array (keyed by zero-based index string: `"0"`, `"1"`, ...). - A `clips` map of AnimatedSpriteClipDefinition entries built from `meta.frameTags`, one per named tag. - The `slices` and `layers` metadata maps, carried through verbatim.
Call createAnimatedSprite to obtain a ready-to-use AnimatedSprite with all clips pre-registered.
destroy(): voidparse(data: AsepriteDataUnion of both Aseprite JSON export formats. Use isAsepriteArrayData to discriminate between array and hash mode., texture: TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…): AsepriteSheetclips: ReadonlyMap<string, AnimatedSpriteClipDefinitionDefinition for a single animation clip registered on an AnimatedSprite.>slices: ReadonlyMap<string, AsepriteSliceA named slice defined in the Aseprite editor.>