$.loadImage( x, y, filepath)

Queues an image to be loaded and ready for use in your update function. It takes a pair of numbers for the x and y coordinates and a string indicating the location of a img file asset.,Img file assets are expected to be .png or .jpg.

  • x : number //
  • y : number //
  • filepath : string //location of the image file to be loaded

Examples


const img = $.loadImage(
	$.w/2, 				// x position
	$.h/2, 				// y position
	"/images/sir_cheesealot.png" // path to image
);

function update() {
    img.draw();
}