GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Because transitive dependencies get inserted in to the browserify bundle multiple times (see substack/node-browserify#186) THREE.js can get loaded and instantiated multiple times in a single voxel-engine app.
This causes problems because for example instanceof checks fail for objects created in one Three instance and passed to another.
In my case
var mesh = new Mesh(voxelData);
Fails because the
mesh instanceof Object3d
fails inside Three.js
Add an option to supply a THREE.js instance
Merge pull request #5 from leolannenmaki/workaround-for-threejs-multi…
Add an option to supply a THREE.js instance to the Mesh constructor
Thanks! Any idea how we could fix three.js?
Sorry, no idea. It seems riddled with instanceof checks.