Function createSpriteAtlasFromFrames
-
createSpriteAtlasFromFrames(
engine: EngineContext,
sources: readonly SpriteAtlasFrameSource[],
options?: SpriteAtlasPackOptions,
): SpriteAtlasParameters
- engine: EngineContext
- sources: readonly SpriteAtlasFrameSource[]
- options: SpriteAtlasPackOptions = {}
Returns SpriteAtlas
Pack
sourcesinto a singleSpriteAtlas. Shelf-packs in input order: each frame is placed left-to-right on the current shelf, wrapping to a new shelf (row) when it would overflowmaxWidthPx. The texture is sized exactly to the packed content unlessoptions.capacityPxis supplied to reserve headroom for laterappendSpriteAtlasFramescalls.Pass
sources: []together withoptions.capacityPxto create an empty atlas sized for future appends.