问题
I would like to use one geometry object for some fancy particle animation and display lines between those particles.
geometry = new THREE.Geometry();
particles = new THREE.ParticleSystem(geometry, particleMaterial);
line = new THREE.Line(geometry, lineMaterial, THREE.LinePieces);
Somehow the Line Object is not rendered in the scene, but the particles show up.
http://jsfiddle.net/Pk85y/1/
回答1:
With WebGLRenderer
you can't share geometry in some specific situations. Best option is to do geometry.clone()
.
Here's the jsfiddle fixed: http://jsfiddle.net/Pk85y/3/
来源:https://stackoverflow.com/questions/13489228/three-js-share-a-geometry-for-lines-and-particles