charlie_says Posted February 12, 2018 Share Posted February 12, 2018 HI, Apologies for the rather basic question, but, the almost all of the articles & threads I've found are about loading JSON files in relation to a tileset or atlas. I just need to load some data, it doesn't have to be JSON, it could be csv, but examples are a bit thin on the ground. Is this possible? I have found one example, but it has a separate loader just for the JSON, it doesn't appear to add it into the loader resources - does it have to be done this way? Thanks! <edit> So, immediately after this I got it working by accessing the resources in loader complete method. But, I still wonder if it's possible to access the JSON from the cache as you do with sprites? Quote Link to comment Share on other sites More sharing options...
Exca Posted February 12, 2018 Share Posted February 12, 2018 The file should be available in loader.resources[nameOfTheFile]. Quote Link to comment Share on other sites More sharing options...
botmaster Posted February 12, 2018 Share Posted February 12, 2018 Loading assets doesn't have to be done with PIXI, PIXI offers it for convenience but you can load just about anything using AJAX yourself and it's really not hard at all, just watch out for security restrictions. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
charlie_says Posted February 12, 2018 Author Share Posted February 12, 2018 thanks both! 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.