@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.