phaser icon indicating copy to clipboard operation
phaser copied to clipboard

TileSprite frame size

Open ddanushkin opened this issue 2 years ago • 0 comments

Version

  • Phaser Version: 3.55.2

Description

Wrong frame size for trimmed atlas frames Two gameobject, one on top of another Tinted is Image White is TileSprite As you can see, TileSprite rendered without offsets, while Image rendered fine.

image image

Maybe i am wrong and this is normal behaviour for TileSprite?)

Example Test Code

  const image = this.add.image(0, 0, Atlas.Key, Atlas.Pattern).setTint(0xFF00FF);
  const tileSprite = this.add.tileSprite(0, 0, image.displayWidth, image.displayHeight, Atlas.Key, Atlas.Pattern).setAlpha(0.75);
  
  image.setInteractive()
  this.input.enableDebug(image);
  
  tileSprite.setInteractive()
  this.input.enableDebug(tileSprite);

Additional Information

ddanushkin avatar May 17 '22 15:05 ddanushkin