You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, use CommonJS or ES6 modules for all things. This will help to convert to a properly modular library for NPM.
The advantage of this is that people will be able to require/import certain classes into their projects, and their build tools will compile only those classes, not the entire library, making application more lean.
The user can optionally use THREE as a contain-all by importing three. That would load the project's index.js file, and that file would use CommonJS or ES6 import syntax to load all the other files it needs, and it would export a single object equivalent of what THREE currently is.
Users would also be able to import, say, three/core/Object3D as in
importObject3Dfrom`three/core/Object3D`
or
let Object3D = require('three/core/Object3D')
to import classes directly, and when their program is compiled, only the things they use will be built into their applications.
ES6 modules are an official part of JavaScript now, so it would be super beneficial to convert to those, use semver, and to publish on NPM.
The text was updated successfully, but these errors were encountered:
For example, use CommonJS or ES6 modules for all things. This will help to convert to a properly modular library for NPM.
The advantage of this is that people will be able to require/import certain classes into their projects, and their build tools will compile only those classes, not the entire library, making application more lean.
The user can optionally use
THREE
as a contain-all by importingthree
. That would load the project's index.js file, and that file would use CommonJS or ES6 import syntax to load all the other files it needs, and it would export a single object equivalent of whatTHREE
currently is.Users would also be able to import, say,
three/core/Object3D
as inor
to import classes directly, and when their program is compiled, only the things they use will be built into their applications.
ES6 modules are an official part of JavaScript now, so it would be super beneficial to convert to those, use semver, and to publish on NPM.
The text was updated successfully, but these errors were encountered: