but the HTML file loads forever in Firefox, so I guess this way of doing is wrong.
I installed three.js in my project directory with ’npm install --save three’ and put in my HTML file this code:
// scene -----
var threeScene;
var renderer;
var camera;
var cameraControls;
//simulation -----
function simulate() {
}
// -----
function initThreeScene() {
threeScene = new THREE.Scene();
but either the page loads forever or I get a “THREE is not defined” error. I’m very new to npm and three.js, can anybody help me there? Thanks!
F. Delente
In the toolbar with the toggle switches, click on “jspm.io” and change it to “jsdelivr” (or not, you can test and choose the CDN that you prefer. JSDelivr supports GitHub URLs with commit hashes for versions, for example)