Because transitive dependencies get inserted in to the browserify bundle multiple times (see https://github.com/substack/node-browserify/issues/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);
game.scene.add(mesh.createSurfaceMesh());
Because transitive dependencies get inserted in to the browserify bundle multiple times (see https://github.com/substack/node-browserify/issues/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
Fails because the
fails inside Three.js