Instanced mesh preview

Preview of a feature that should be making it into the next version if three. Should be able to monkey patch older versions of three that use the same shaders. It would be nice if someone could give some feedback or thoughts on the pull request.

http://dusanbosnjak.com/test/webGL/three-instanced-mesh/webgl_instanced_mesh.html

https://www.npmjs.com/package/three-instanced-mesh

5 Likes

I did an update, the code should now be the same as in the three pull request. Please take it for a spin :slight_smile:

1 Like

Hi,

Iā€™m using THREE.InstancedBufferGeometry to create instanced meshes. I put the instanced mesh at position (0,0,0). But there is a problem: once the instance at the center position (0,0,0) is out of sight (out of the viewing frustum), all instanced meshes disappears. Can I set something to avoid this to make the instanced meshes not clipped?

I have tried your three-instanced-mesh but I failed to understand how you make the instanced meshes always visible.:slightly_frowning_face: Could you please tell me about that?

environment: threejs r89, Chrome 64.0.3282.140.

Thanks!

I just found it: frustumCulled.

doc: https://threejs.org/docs/index.html#api/core/Object3D.frustumCulled