Forum

Adding physics with export .html feature?

16 October 2014 12:51 #262
Hi,
Is there a way to incorporate the uranium physics model while using the export .html function as opposed to the export .json?
I tried going into the html file and adding

<script src="uranium.js"></script>

but it didn't work. I'm not an expert coder, just looking for a simple solution to add physics to my blender game.
Thanks in advance for your responses!
16 October 2014 13:04 #263
Hi glanderglander and welcome to the Blend4Web forum!

We intentionally do not support physics for self-contained HTML files just to keep their size small. However you still can use physics within standard web player if you load external JSON files as it is shown in this tutorial.

Alternatively you can write your own app and link uranium.js to it. See our programming tutorials.
Development Lead | Twitter
16 October 2014 13:15 #264
Ответ на сообщение пользователя Yuri Kovelenov
Hi glanderglander and welcome to the Blend4Web forum!

We intentionally do not support physics for self-contained HTML files just to keep their size small. However you still can use physics within standard web player if you load external JSON files as it is shown in this tutorial.

Alternatively you can write your own app and link uranium.js to it. See our programming tutorials.


Ahhh, i see! I think this might be exactly what I was looking for. So, would I use method 2 on that page?
16 October 2014 14:35 #266
Yep, moreover loading external JSON files with the web player is more effective than using self-contained HTML files
Development Lead | Twitter
 
Please register or log in to leave a reply.