I have numerous potentially long polylines (or short, vertices count is highly volatile) to display, so I was thinking about packing them in a bunch of fixed size (let\'s sa
BufferGeometry.groups
is now used to support multiple materials ( formerly MultiMaterial
or MeshFaceMaterial
). For example,
geometry.clearGroups();
geometry.addGroup( start1, count1, 0 ); // materialIndex 0
geometry.addGroup( start2, count2, 1 ); // materialIndex 1
var mesh = new THREE.Mesh( geometry, materialsArray );
Setting geometry.drawRange
will render a sub-range of the geometry.
geometry.setDrawRange( start, count );
var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
var line = new THREE.Line( geometry, material );
fiddle: http://jsfiddle.net/w67tzfhx/
three.js r.91