-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest master npm build broken because implicit THREE global is used #95
Comments
This is a first step to modernizing the codebase and to make it work with npm. Ticket squarefeet#95 currently tracks the npm build process.
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
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 |
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.
The text was updated successfully, but these errors were encountered: