How to include ThreeJS with TrackballControls.js into widget inorder to create some webgl.

0
Hello i try to create a WebGL widget using Threejs & TrackballControls.js external libs. i am unable to include TrackballControls.js because it is not an amd module and this file is dependent on Threejs instance. if anyone has any idea we can include both the libs and create a basic example please share some suggestions.  
asked
1 answers
0

Have a look at the following two repo's:

https://github.com/JelteMX/generator-mendix-widget

https://github.com/JelteMX/widget-base

The generator uses widget-base as a starting point. If you look into the src folder, you will see that the widget is built using an ES6 setup. Furthermore, you'll be able to include any browser-compatible npm module in the widget. Here's for example one where I use a json component from NPM: https://github.com/JelteMX/mendix-json-widget

answered