draw(renderer) {
		// do nothing if we are flickering
		if (this._flicker.isFlickering) {
			this._flicker.state = !this._flicker.state;
			if (!this._flicker.state) {
				return;
			}
		}

		// the frame to draw
		const frame = this.current;

		// cache the current position and size
		let xpos = this.pos.x;
		const ypos = this.pos.y;

		let w = frame.width;
		let h = frame.height;

		// frame offset in the texture/atlas
		const frame_offset = frame.offset;
		const g_offset = this.offset;

		// remove image's TexturePacker/ShoeBox rotation
		if (frame.angle !== 0) {
			renderer.translate(-xpos, -ypos);
			renderer.rotate(frame.angle);
			xpos -= h;
			w = frame.height;
			h = frame.width;
		}

		renderer.drawImage(
			this.image,
			g_offset.x + frame_offset.x, // sx
			g_offset.y + frame_offset.y, // sy
			w,
			h, // sw,sh
			xpos,
			ypos, // dx,dy
			w,
			h, // dw,dh
		);
	}
draw this srite (automatically called by melonJS)
@param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
@param {Camera2d} [viewport] - the viewport to (re)draw