kittykatattack / learningPixi

A step-by-step introduction to making games and interactive media with the Pixi.js rendering engine.
4.4k stars 851 forks source link

Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions #159

Open rabago91 opened 3 years ago

rabago91 commented 3 years ago

The error says: Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions: X: 128 + 64 = 192 > 192 Y: 256 + 64 = 320 > 192

In the document it says: let rectangle = new Rectangle(192, 128, 64, 64);

The problem is that the tiles are 32 pixels based not 64 for the image https://github.com/kittykatattack/learningPixi/blob/master/examples/images/screenshots/09.png so instead of Rectangle(192, 128, 64, 64) it should be Rectangle(96, 64, 32, 32)

That works fine 😄