Canvas3D with WebGL, three.js and physics engine e.g. Physijs, Cannon
-
wrote on 27 Jul 2015, 12:57 last edited by
Hi,
is it possible to use any physics engine e.g. Physijs, ammo.js, Cannon.js with Canvas3D and WebGL in QML project. Does Qt support this. Does anyone try to do this? I was looking for some example program, but I did not find anything. Maybe someone did this.
-
Hi,
is it possible to use any physics engine e.g. Physijs, ammo.js, Cannon.js with Canvas3D and WebGL in QML project. Does Qt support this. Does anyone try to do this? I was looking for some example program, but I did not find anything. Maybe someone did this.
@dante I doubt that it will work readily with QML. Javascript support in QML is very restricted as compared to that of Web-Browsers. It lacks of certain objects which are mostly used in these web-browsers supported Javascripts.
You can find more info here:
http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html
http://doc.qt.io/qt-5/qtqml-javascript-expressions.html
http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html#javascript-environment-restrictions
You will need to create you own port of it without those restrictions.
For eg. here is a blog post for porting-three-js-code-to-canvas3d. Something similar will be needed for the rest too.
1/2