drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
		if (this.getGlobalAlpha() < 1 / 255) {
			// Fast path: don't draw fully transparent
			return;
		}
		const context = this.getContext();

		if (typeof sw === "undefined") {
			sw = dw = image.width;
			sh = dh = image.height;
			dx = sx;
			dy = sy;
			sx = 0;
			sy = 0;
		} else if (typeof dx === "undefined") {
			dx = sx;
			dy = sy;
			dw = sw;
			dh = sh;
			sw = image.width;
			sh = image.height;
			sx = 0;
			sy = 0;
		}

		if (this.settings.subPixel === false) {
			// clamp to pixel grid
			dx = ~~dx;
			dy = ~~dy;
		}

		// apply a tint if required
		let source = image;
		const tint = this.currentTint.toArray();
		if (tint[0] !== 1.0 || tint[1] !== 1.0 || tint[2] !== 1.0) {
			// get a tinted version of this image from the texture cache
			source = this.cache.tint(image, this.currentTint.toRGB());
		}
		context.drawImage(source, sx, sy, sw, sh, dx, dy, dw, dh);
	}
Draw an image onto the main using the canvas api
@param {HTMLImageElement|SVGImageElement|HTMLVideoElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas|VideoFrame} image - An element to draw into the context.
@param {number} sx - The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
@param {number} sy - The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
@param {number} sw - The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.
@param {number} sh - The height of the sub-rectangle of the source image to draw into the destination context.
@param {number} dx - The X coordinate in the destination canvas at which to place the top-left corner of the source image.
@param {number} dy - The Y coordinate in the destination canvas at which to place the top-left corner of the source image.
@param {number} dw - The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.
@param {number} dh - The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.
@example
// Position the image on the canvas:
renderer.drawImage(image, dx, dy);
// Position the image on the canvas, and specify width and height of the image:
renderer.drawImage(image, dx, dy, dWidth, dHeight);
// Clip the image and position the clipped part on the canvas:
renderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);