Get a loaded image (an "image" asset, or the image of an "aseprite"
one). Given a path, its directory and extension are ignored, so
getImage("data/img/player.png") finds the image named "player".
Most engine classes take the name instead, and look it up themselves:
new Sprite(0, 0, { image: "player" }).
Parameters
image: string
the asset name
Returns HTMLImageElement|CompressedImage|null
the image, or null if
none is loaded under that name
Get a loaded image (an
"image"asset, or the image of an"aseprite"one). Given a path, its directory and extension are ignored, sogetImage("data/img/player.png")finds the image named"player". Most engine classes take the name instead, and look it up themselves:new Sprite(0, 0, { image: "player" }).