draw(renderer, viewport) {
		const width = this.width;
		const height = this.height;
		const bw = viewport.bounds.width;
		const bh = viewport.bounds.height;
		const ax = this.anchorPoint.x;
		const ay = this.anchorPoint.y;

		let x = this.pos.x;
		let y = this.pos.y;

		if (this.ratio.x === 0 && this.ratio.y === 0) {
			// static image
			x = x + ax * (bw - width);
			y = y + ay * (bh - height);
		}

		renderer.translate(x, y);
		renderer.drawPattern(
			this._pattern,
			0,
			0,
			viewport.width * 2,
			viewport.height * 2,
		);
	}
draw this ImageLayer (automatically called by melonJS)
@protected
@param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
@param {Camera2d} [viewport] - the viewport to (re)draw