Beyb26 Posted July 11, 2017 Report 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 Quote Link to comment Share on other sites More sharing options...
rich Posted July 11, 2017 Report 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. Quote Link to comment Share on other sites More sharing options...
Beyb26 Posted July 11, 2017 Author Report Share Posted July 11, 2017 Ow. Thank you sir. Quote Link to comment Share on other sites More sharing options...
rich Posted July 11, 2017 Report 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. Quote Link to comment Share on other sites More sharing options...
Beyb26 Posted July 12, 2017 Author Report 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 Quote Link to comment Share on other sites More sharing options...
Beyb26 Posted July 13, 2017 Author Report Share Posted July 13, 2017 Fix!!! Just reload all your JS files in your localhost server. If someone has this error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.