Image's height in pixels.
The actual image data.
Image's width in pixels.
const sprite1Url: BpxImageUrl = "spritesheet.png"; // refers to `./public/spritesheet.png`
const sprite2Url: BpxImageUrl = "https://the.url/of/another-spritesheet.png";
let sprite1: BpxSprite;
let sprite2: BpxSprite;
$x.setOnStarted(() => {
sprite1 = $spr(sprite1Url)(8,8,0,0);
sprite2 = $spr(sprite2Url)(8,8,0,0);
});
$x.start({
// ...,
assets: [
sprite1Url,
sprite2Url,
],
});
Number of image channels.