Install THREE.js: npm install three
Configuring aurelia.json
:
"dependencies": [
{
"name": "three",
"path": "../node_modules/three/build",
"main": "three.min"
}
importing in view: import * as THREE from 'three';
Ok so this works and I am able to use three.js
, however, I would also like to use some of the plugins. Specifically GPUParticleSystem
. Now this plugin depends on a Global THREE
object. In a first attempt I added this to aurelia.json
"dependencies": [
{
"name": "three",
"path": "../node_modules/three/build",
"main": "three.min",
"exports": "THREE" //this should make the library a global object?
}
But it doesn't seem to be working? I cannot see the global variable from devTools.