Three.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Three.js

horrido
I'm trying to import three.js. I've installed it with:

bower install threejs --save


And I've created a threejs.amd.json file (because it doesn't have any kind of amd file):

{
   
"paths": {
       
"threejs": "build/three"
   
}
}


After I run 'grunt devel', I try to import with:

imports: {'threejs'. "and the rest of the imports"}


But the package doesn't seem to load–the app runs okay, but there's no 'three' module in the browser. There is only one JS file and that's three.js in the 'build' directory. Surely, that is the only module. If I do anything like import 'threejs/three', it kills the application.

What am I doing wrong?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Three.js

horrido
Never mind. I just realized that I'm not supposed to see the 'threejs' package in the browser. This thing keeps confusing me. Every time I install and import a package, I expect to see it in the browser. And when I don't, I think something is wrong. But a JS library is not a browse-able, object-oriented package.

I need some way to remind me of this...


On Saturday, 27 June 2015 22:04:56 UTC-4, Richard Eng wrote:
I'm trying to import three.js. I've installed it with:

bower install threejs --save


And I've created a threejs.amd.json file (because it doesn't have any kind of amd file):

{
   
"paths": {
       
"threejs": "build/three"
   
}
}


After I run 'grunt devel', I try to import with:

imports: {'threejs'. "and the rest of the imports"}


But the package doesn't seem to load–the app runs okay, but there's no 'three' module in the browser. There is only one JS file and that's three.js in the 'build' directory. Surely, that is the only module. If I do anything like import 'threejs/three', it kills the application.

What am I doing wrong?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.