kittykatattack / learningPixi

A step-by-step introduction to making games and interactive media with the Pixi.js rendering engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

rabago91 opened this issue · comments

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 😄