Beyb26 Posted July 11, 2017 Share Posted July 11, 2017 Why I am having error in this texture atlas. I'm am using JSON and texture atlas. i packed my texture using Texture Packer free version why is that I'm having error on this line -- sprite.animations.add(some parameters); -- Please help. I am new in texture atlas. sampleCharacter.json Link to comment Share on other sites More sharing options...
rich Posted July 11, 2017 Share Posted July 11, 2017 sampleCharacter is a JSON file. Why are you loading it with 'atlasXML' ??? Also the keys in the JSON file you attached above have '.png' on the end, so you need to provide that to generateFrameNames as the suffix. Link to comment Share on other sites More sharing options...
Beyb26 Posted July 11, 2017 Author Share Posted July 11, 2017 Ow. Thank you sir. Link to comment Share on other sites More sharing options...
rich Posted July 11, 2017 Share Posted July 11, 2017 Texture Packer has an option to 'trim filename' from the keys, so you don't have to add it in. Might only be in the paid version though. Link to comment Share on other sites More sharing options...
Beyb26 Posted July 12, 2017 Author Share Posted July 12, 2017 @rich Hello Sir, Why I still having this error? I don't know where it came from. I think I placed everything correctly but it seems like there's something wrong with the texture files? I'm using Texture Packer Free version. sampleCharacter.json Link to comment Share on other sites More sharing options...
Beyb26 Posted July 13, 2017 Author Share Posted July 13, 2017 Fix!!! Just reload all your JS files in your localhost server. If someone has this error. Link to comment Share on other sites More sharing options...
Recommended Posts