I need load digital data in game to create some object, i create *.jsom file with this objects data.
Now how i can load *.json to webstorage or array?
Develop games in your browser. Powerful, performant & highly capable.
if I'm not mistaken, use the BROWSER object to load a file... that file must be in your FILES folder under your project structure.
Add your json to projects and use ajax
I wrote this tutorial awhile ago, it has the json in projects files, it uses ajax, pretty straight forward really. I know it was to actually use the data in array, but how I got the data into array is what you want to look at.
Edit: just took screenshot
Now you have your array you need to save it to webstorage
Ingamedata is the name of my array in this example