draw tiled only by X

This commit is contained in:
Alexander Popov 2023-04-30 18:59:50 +03:00
parent 8ea015eee0
commit 1e50ed7a48
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
1 changed files with 6 additions and 0 deletions

View File

@ -132,6 +132,9 @@ export class TiledSprite extends Sprite {
case 'y':
context.drawImage(this.image(), this.x, this.y - this.image().height * iy);
break;
case 'x':
context.drawImage(this.image(), this.x - this.image().width * ix, this.y);
break;
case null:
default:
context.drawImage(
@ -163,6 +166,9 @@ export class TiledSprite extends Sprite {
case 'y':
context.drawImage(this.image(), this.x, this.y + this.image().height * iy);
break;
case 'x':
context.drawImage(this.image(), this.x + this.image().width * ix, this.y);
break;
case null:
default:
context.drawImage(