Forum

How do you set up the paths to use an exported json on an existing website?

14 October 2016 18:49
Our website already has a file structure it wouldn't make sense to redo, so i am trying to export the json files to a folder called 'blend4web' within the existing folder hierarchy. I have loaded it on our GitHub site to play with it before putting it on the official site. The scene doesn't load, though. What have i done wrong?

The GitHub site is here, and the repo is here.

The html is
<iframe width="80%" height="auto" src="webplayer/webplayer.html?load=blend4web/LalandeMarkers.json">if you see this something is wrong</iframe>


The blend4web folder has the bin file, the json file, the image for the texture, and i threw in the blender file. The webplayer folder has everything from deploy/apps/webplayer in the SDK.
14 October 2016 19:09
Reply to post of user kimholder
Our website already has a file structure it wouldn't make sense to redo, so i am trying to export the json files to a folder called 'blend4web' within the existing folder hierarchy. I have loaded it on our GitHub site to play with it before putting it on the official site. The scene doesn't load, though. What have i done wrong?

The GitHub site is here, and the repo is here.

The html is
<iframe width="80%" height="auto" src="webplayer/webplayer.html?load=blend4web/LalandeMarkers.json">if you see this something is wrong</iframe>


The blend4web folder has the bin file, the json file, the image for the texture, and i threw in the blender file. The webplayer folder has everything from deploy/apps/webplayer in the SDK.
Hi,
The path to json in the iframe should be set relatively to webplayer.html. So you need to put "../" before the folder path.
This code will work:
<iframe width="80%" height="auto" src="webplayer/webplayer.html?load=../blend4web/LalandeMarkers.json">if you see this something is wrong</iframe>
14 October 2016 19:12
Hi,

It looks like your web player cannot load the JSON file (you can see a 404 error in the browser console with F12).
This is because of your file structure: try this
http://briligg.github.io/moonwards/webplayer/webplayer.html?load=../blend4web/LalandeMarkers.json
Cool project btw.

EDIT Just found that Evgeny has already answered this. So you got two answers for the price of one.
The Founder | Twitter | Facebook | Linkedin
14 October 2016 19:16
Thanks, Evgeny
14 October 2016 19:23
… and Yuri. I am glad you like it - it will hopefully get much better soon
 
Please register or log in to leave a reply.