Interface LoadAtlasOptions
interface LoadAtlasOptions {
gridSize?: readonly [number, number];
metadataUrl?: string;
premultipliedAlpha?: boolean;
premultiplyOnLoad?: boolean;
sampling?: SpriteSampling;
textureOptions?: Texture2DOptions;
}
gridSize?: readonly [number, number];
metadataUrl?: string;
premultipliedAlpha?: boolean;
premultiplyOnLoad?: boolean;
sampling?: SpriteSampling;
textureOptions?: Texture2DOptions;
}
Index
Properties
Optionalgrid Size
gridSize?: readonly [number, number]
Grid cell size [w, h] in pixels. Required in PR 1.
Optionalmetadata Url
metadataUrl?: string
Reserved for future PR — TexturePacker-style JSON. Throws if used in PR 1.
Optionalpremultiplied Alpha
premultipliedAlpha?: boolean
Marks the atlas as carrying premultiplied RGBA so the renderer picks the
premultiplied blend pipeline (srcFactor: ONE). Default false — matches
the bits PNG decoding produces. Set together with premultiplyOnLoad: true
for mathematically correct soft edges. Setting this true without
premultiplyOnLoad: true is only correct if the source image is already
premultiplied on disk (e.g. produced by a build step).
Optionalpremultiply On Load
premultiplyOnLoad?: boolean
Tell the texture loader to premultiply alpha at decode time
(createImageBitmap({ premultiplyAlpha: "premultiply" })). Default false.
Pair with premultipliedAlpha: true for the premultiplied blend pipeline.
Options for
loadSpriteAtlas. PR 1 supports thegridSizepath only.