bmanderscheid Posted October 4, 2016 Share Posted October 4, 2016 Is it possible to prepare spritesheet assets for PIXI that utilize multiple images, but a single json file. I come from an extensive easelJS background and was able to accomplish this, but can't seem to figure it out for PIXI. My app dynamically loads one of many possible sets of assets, so I never know how many json files I need to load for any chosen set. If the vehicle Juke is chosen, there could be juke0.json, and juke1.json. If Altima is chosen, there could be altima0.json, altima1.json, and altima2.json..... and so on..... My gut says to just loop like 10 times and wrap some sort of try around each .add() call, but I don't want to go there if I don't need to. Thanks for any help! I really don't want to go back to easel... Quote Link to comment Share on other sites More sharing options...
xerver Posted October 4, 2016 Share Posted October 4, 2016 Take a look at the spritesheeet parser: https://github.com/pixijs/pixi.js/blob/master/src/loaders/spritesheetParser.js It is what translates the json load into the image load. Preparing a similar middleware of your own to do what you want should be trivial. sombriks 1 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.