Forum

Attaining content HTML coding

16 September 2015 18:57
Just a quick newbie question; Can someone tell me how I can attain the html coding from a Blend4web exported file? I want to sub it into a websites html app in order to potentially further manipulate the coding for further visuals using javascript? Thanks.
16 September 2015 19:19
You can use JSON format instead of HTML. This way all scene data will be conveniently exposed to JavaScript. Please see these tuts:
Creating an Interactive Web Application
Webmasters! 3 Ways to 3D Web
The Founder | Twitter | Facebook | Linkedin
17 September 2015 17:53
And this translation of scene data will then allow additional manipulations to the JSON coding thereafter? Thanks for your help!
17 September 2015 18:39
Correct!
The Founder | Twitter | Facebook | Linkedin
21 September 2015 18:36
Neat, Cheers!
22 September 2015 19:15
Hi, I'm currently trying to pursue the proposed "Webmasters! 3 Ways to 3D Web" solution. I have a HTML file created for this framework coding and am curious about the "no external dependencies" feature of this Blend4web method. Can I query for further information on how to host the HTML content in this self-sufficient manner in order for it to be accessible via iFrame? Also, in regards to the alternative method, I cannot seem to locate the Blend4web tab in the objects segments. Is there an external setting I have neglected to tick for this option in order to make the interactive feature 'Selectable'?
23 September 2015 18:31
I have a HTML file created for this framework coding and am curious about the "no external dependencies" feature of this Blend4web method
As it is described in this tutorial you just need to point your html-exported scene inside the iframe tag.
 <iframe width="800" height="500" src="/path/to/your/scene"></iframe>

The path here is given relatively to the main html page. This should work without any problems. I have attach a simple example of how it works.

I cannot seem to locate the Blend4web tab in the objects segments. Is there an external setting I have neglected to tick for this option in order to make the interactive feature 'Selectable'?
Have you switched to the Blend4Web render engine?
23 September 2015 20:39
In regards to the missing tab, I have indeed switched to the Blend4web render engine. The Blend4web subtab just simply doesn't make an appearance within the Object Tab.

With the iframe window, does the HTML page need to be hosted online in order to feature within this framework? Is it possible to simply export the scene as code and place it within the iframe coding under a specific line or is this too much hassle? That way, I could theoretically edit the final code with javascript lines as I get more fluent. Sorry for all of the newbie questions…
24 September 2015 17:27
Ответ на сообщение пользователя paul
In regards to the missing tab, I have indeed switched to the Blend4web render engine. The Blend4web subtab just simply doesn't make an appearance within the Object Tab.
Blend4Web subtab was removed several releases ago (in 15.06 to be exact). When you switch to Blend4Web renderer, you already have all related to b4w options in corresponding tabs. What kind of options are you trying to find?

With the iframe window, does the HTML page need to be hosted online in order to feature within this framework? Is it possible to simply export the scene as code and place it within the iframe coding under a specific line or is this too much hassle? That way, I could theoretically edit the final code with javascript lines as I get more fluent. Sorry for all of the newbie questions…
Well. Exported HTML has to be on the server as well as any other asset you use on your website.
If you are planning to use some coding, then you'd better go with the JSON export and write a simple app. Putting it into i-frame would be similar to the previously described approach. You will also have some html-file which should be placed inside the iframe tag.
25 September 2015 04:27
I have been working on the "Application" style of export that enables you to control or script your project with a separate JS file. I will get this documented with videos when i can.
(Reposted from another thread)
Here is the working result:
http://williamwelker.com/b4w/my_cube/index.html
Project zip file: http://williamwelker.com/b4w/my_cube.zip
Unzip it and put it in your SDK file like: C:\blend4web\deploy\apps\my_cube
Then make sure your local server is running and test it at http://localhost:6687/deploy/apps/my_cube/index.html
This is a bare bones application export so there are no camera controls, just a static default cube from Blender.
I typed this out from scratch, so if you want to do that, you can paste your code into http://www.jslint.com/ to check it for errors. I am not a professional coder so I had a few.
 
Please register or log in to leave a reply.