Error with spritesheet definition in pack.json

Phaser Game is throwing an error when trying to load a spritesheet via a JSON pack file.

See here:

      {
        "type": "spritesheet",
        "key": "temp-person",
        "url": "people/01.png",
        "config": {
          "frameWidth": 64,
          "frameHeight": 64
        },
      },

So onRefresh, I get Uncaught Error: TextureManager.SpriteSheet: Invalid frameWidth given.

I moved frameWidth and frameHeight into the root of the pack definition (so moved out of the config: {} object), but got the same error. Wondering where I’m using the pack wrong, or if it’s a bug with Phaser’s packs?

I think it should be frameConfig.

Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig

2 Likes

Yup that’s it; had gone through the Documentation but somehow missed that one. I get a little lost when it comes to those scene namespace shortcuts. Thanks!