CaptKiwi Posted October 14, 2013 Share Posted October 14, 2013 Hi Guys,Could someone elaborate on what the following error message means : "Texture Error: frame does not fit inside the base Texture dimensions [object Object]". It happens when trying to use a spritesheet creator (like texturepacker) which uses default dimentions. If I manually make my own sheet, making sure the width and height dimensions fit the sprites, I don't get this error. I'm using the following loader code : game.load.spritesheet('target', 'http://xxxxx/games/assets/popper/bullets/bulletsheet.png' 67, 67, 5); Cheers! Link to comment Share on other sites More sharing options...
rich Posted October 14, 2013 Share Posted October 14, 2013 If you're using Texture Packer you should really be using game.load.atlas and giving it the image + json data that TP generates. When you export from TP make sure you pick "json (hash)" format. Link to comment Share on other sites More sharing options...
CaptKiwi Posted October 14, 2013 Author Share Posted October 14, 2013 Thank you rich, I was successfully able to utilise game.load.atlas Link to comment Share on other sites More sharing options...
4ucai Posted October 15, 2013 Share Posted October 15, 2013 Hi rich, If you're using Texture Packer you should really be using game.load.atlas and giving it the image + json data that TP generates. When you export from TP make sure you pick "json (hash)" format. Did you mean to use "game.load.atlasJSONHash" for "json (hash) format" and "game.load.atlas" for "json (array) format"? I also looked at the examples and confirmed their use. Link to comment Share on other sites More sharing options...
rich Posted October 15, 2013 Share Posted October 15, 2013 Yeah it's that way around, sorry.. that's what happens when you work all night, sleep for a few hours then work all day 4ucai 1 Link to comment Share on other sites More sharing options...
feiss Posted December 14, 2013 Share Posted December 14, 2013 Hi, I've just encountered this error, but my TexturePacker stuff was all right, and the loading in Phaser was correct. Turned out to be a cache problem. Make sure you clear your browser's cache before wasting more time checking your code. or, as I do from now on, on my development version, add a random query to the url of all your resources:var randomurl= '?r='+(Math.floor(Math.random()*999999));game.load.image('img', 'assets/image.png'+randomurl);game.load.spritesheet('sheet', 'assets/spritesheet.png'+randomurl, 64, 64);//etc..cheers! Link to comment Share on other sites More sharing options...
rich Posted December 15, 2013 Share Posted December 15, 2013 Use Chrome, open the dev tools window, click the settings cog, check "Disable cache (while DevTools is open)". Then never worry about it ever again and F5 to your hearts content. Starboar and jpdev 2 Link to comment Share on other sites More sharing options...
Recommended Posts