Original message (verbatim)
TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.
Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.
Trigger
When slicing a sub-sheet from existing atlas frames with spritesheet, the supplied frameWidth is zero, negative, or larger than the atlas frame width, and the parser throws directly.
Typical cause
SpriteSheetFromAtlas validates frameWidth before computing rows and columns; an invalid value cannot derive a valid frame width, so the constructor throws an Error and aborts texture registration.
Step-by-step fix
- Match frameWidth/frameHeight to the pixel size of a single frame in the atlas.
- Confirm the atlas frames are already registered through the atlas/json parser.
- Fix the margin/spacing miscalculation that yields a zero frame width.
Source links
Per-entry sources and capture date are listed at /sources#P29.
Related errors
Related Phaser errors
Need an offline quick-reference checklist?
Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.
Back to the all-errors index Checkout and buy the Pro pack — $19.00