SpriteAtlas

A packed sprite atlas loaded with AssetLoader.loadSpriteAtlas() or Game.loadSpriteAtlas(): its sheets (loaded as bitmaps) and every frame's rect. Game.getSpriteAtlasFrames() turns it into a shared BGE.SpriteFrames.

The .json it's read from is {sheets: ["hero.png", "hero_1.png"], frames: [SpriteFrameRect...]}, as tools/render-character.py --packed writes. Sheet files are relative to the .json.

Properties

  • name (string) — The name it was loaded under
  • source (string) — The .json path or URL it was loaded from
  • sheets (Array.<string>) — The name each sheet's bitmap is loaded under (<name>#0, <name>#1, ...)
  • sheetPaths (Array.<string>) — Each sheet's path or URL
  • frames (Array.<BGE.SpriteFrameRect>) — Every frame, in frame order