Interface SpriteAtlasPackOptions
capacityPx?: readonly [number, number];
maxWidthPx?: number;
paddingPx?: number;
premultipliedAlpha?: boolean;
sampling?: SpriteSampling;
srgb?: boolean;
}
Index
Properties
Optionalcapacity Px
Pre-allocate the atlas texture at this [width, height] regardless of initial-content
size, leaving headroom for later appendSpriteAtlasFrames calls (which never grow the
texture). Required when sources is empty. Defaults to the size required by the initial
sources (no append headroom).
Optionalmax Width Px
Shelf width (px) before wrapping to a new row. Default 1024.
Optionalpadding Px
Transparent gap (px) between packed frames; guards against bilinear bleed. Default 1.
Optionalpremultiplied Alpha
Optionalsampling
Min/mag filter for the packed texture. Default "nearest".
Optionalsrgb
Pack into an sRGB texture (rgba8unorm-srgb) so the GPU decodes the stored
sRGB-encoded RGB to linear on sample. Use when the frame pixels are sRGB color
(the common case for glyph/UI atlases) and the renderer composites in linear
space (i.e. an sRGB render target). Alpha is unaffected. Default false —
raw rgba8unorm, matching straight-bytes blending.
Options for
createSpriteAtlasFromFrames.