Function

loadAseprite

(name: string | null, imgSrc: LoadSpriteSrc, jsonSrc: string | AsepriteData): Asset<SpriteData>

Load a sprite with Aseprite spritesheet JSON. You should use "array" in the export options and have tags enabled, that way BUILDNANA can load tagged frames as animations. These are loaded with repacking turned off, since we assume Aseprite is smart enough to pack the frames nicely.

param name- The asset name.

param imgSrc- The image resource url.

loadAseprite("car", "sprites/car.png", "sprites/car.json")

returns The asset data.

since v2000.0

group Assets

subgroup Sprites

buildnana logo

Components

Miscellaneous