Open AndrewRayCode opened 8 years ago
This is fantastic, thanks Andrew!
A few points, though:
I'll have a proper look over these PRs, but from the brief look I've just had, it seems like an interesting start :)
It would be a very minor upgrade to switch from this to ES6 modules, you'd just have to change the require() calls in here to import/export.
Also whatever builds the distributed bundle that's put into build/
will have the correct configuration to sort out the require() calls. npm users will use the normal entry flow and others will use the built file, which most js build tools now know how to work with commonjs
Also I see you pushed 1.0.5 to npm, I would suggest not pushing to npm until this problem is fixed, because this package still fails with the error in the original ticket
Having the same problem here using the NPM package 1.0.5 or 1.0.6. It's now a year later. Would it be possible to push a version to NPM without the need for the THREE (and SPE?) globals? It would be great to be able to use this nice thing through NPM!
This is different from #94
Using the latest build on master:
Currently the compiled main distributed source code uses an implied global THREE.
In the source code I think three should be required with commonjs syntax and included in package.json as a peerDependency. Or you could go the route taken by the OrbitControls npm project and make the user pass in THREE to some top level wrapper.