Skip to content

Kiln API / kiln / SpriteSheetSpec

Interface: SpriteSheetSpec<C> ​

Type Parameters ​

Type ParameterDefault type
C extends stringstring

Properties ​

PropertyTypeDescription
texturestring | Texture<unknown, TextureEventMap> | nullAn image path in public/ (loaded through Assets), a THREE.Texture, or null for an untextured quad.
columns?numberGrid sheets: frames are numbered left to right, top to bottom.
rows?number-
atlas?objectAtlas sheets: the image size and each frame's rectangle in pixels. Frame numbers index this list.
atlas.widthnumber-
atlas.heightnumber-
atlas.framesreadonly AtlasRect[]-
clips{ readonly [K in string]: SpriteClipSpec }-
size?readonly [number, number]World units of one frame, [width, height]. Default [1, 1].
pivot?readonly [number, number]Where the Transform sits on the quad, 0..1 from the bottom-left: [0.5, 0] puts it at the feet. Default [0.5, 0.5].
filter?"linear" | "nearest"'nearest' keeps pixel art crisp (default); 'linear' smooths.
color?ColorRepresentationTint multiplied with the texture. Default white.