Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

SpriteSheetDataOptions

A sheet from Aseprite’s JSON, array or hash, or TexturePacker’s.

  • SpriteSheetBaseOptions
Type Parameter
Clip extends string
Property Type Default value Description
clips? Readonly<Record<Clip, SpriteDataClipOptions>> undefined The clips the game plays, which type Sprite’s clip: each takes the file’s tag of its name, or declares its frames. Left out, every tag is a clip, any name a Sprite names is checked as it draws, and a file with no tags is one clip, all.
data unknown undefined The JSON the tool exported: Aseprite’s with --list-tags, and --list-layers for its cels’ user data as marks; or TexturePacker’s JSON array, hash or Pixi format.
durationSeconds? number undefined Seconds a frame shows where the file gives it none, as TexturePacker gives none and claude-pxl none to a static sprite. A frame’s own duration is kept.
filter? "nearest" | "linear" | TextureFilter TextureFilter.Nearest How its image is sampled: Linear for art that is not pixel art.
frameSize? undefined undefined -
image string | PixelTexture undefined The image’s URL: an import of the PNG, such as import heroImage from "../sprites/hero.png". Or a painted definePixelTexture, which a view paints on first use from the game’s texture seed and a room never paints: Unity’s Sprite.Create over a Texture2D filled with SetPixels, Godot’s SpriteFrames over an ImageTexture of a painted Image.
pixelsPerMetre? number a painted image’s own, otherwise 16 How many of the art’s pixels make a metre, the scene’s Camera2D’s.