Jump to content

Json File Import


Nastro
 Share

Recommended Posts

Hi Nastro.

json parse DOES work...

http://www.babylonjs-playground.com/#1GBPXG#2

So, perhaps, the file retrieval is failing.  Can you open your browser F12 dev tools and look at the network tab... see if there are any json file load failures?

Just some early thoughts. 

Just for fun, here is another version of that playground, but with LOTS of json data. 

http://www.babylonjs-playground.com/#251QRF#17

I found these examples by using a playground search for 'parse'.  *shrug*  :)  Hope this helps.

Link to comment
Share on other sites

Cool!  Write back if you need more assist... use the @Wingnut blue label thing...  to pingnut the wingnut  :)  (it will make a gah-bleep noise in my browser, telling me that you have posted.)

JSON file format might be OK, but maybe load is failing.  Try to use the BABYLON assetsManager and add it as a "task".  There is good callback (onSuccess) options there.

I'm not sure if a JSON file can be loaded that way, but a .babylon file is also JSON, so, why not?  Should work.  Good luck. If successful, we would love to see a playground of it, so others can look and learn. thx.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...