提交 8cf52243 编写于 作者: M Mr.doob

Updated example.

上级 dd1cec72
......@@ -81,7 +81,7 @@
gui.add( effectController, "particleCount", 0, maxParticleCount, 1 ).onChange( function( value ) {
particleCount = parseInt( value );
particles.groups[ 0 ].count = particleCount;
particles.setDrawRange( 0, particleCount );
});
......@@ -146,11 +146,11 @@
}
particles.addGroup( 0, particleCount );
particles.setDrawRange( 0, particleCount );
particles.addAttribute( 'position', new THREE.BufferAttribute( particlePositions, 3 ).setDynamic( true ) );
// create the particle system
pointCloud = new THREE.Points( particles, new THREE.MultiMaterial( [ pMaterial ] ) );
pointCloud = new THREE.Points( particles, pMaterial );
group.add( pointCloud );
var geometry = new THREE.BufferGeometry();
......@@ -160,7 +160,7 @@
geometry.computeBoundingSphere();
geometry.addGroup( 0, 0 );
geometry.setDrawRange( 0, 0 );
var material = new THREE.LineBasicMaterial( {
vertexColors: THREE.VertexColors,
......@@ -168,7 +168,7 @@
transparent: true
} );
linesMesh = new THREE.LineSegments( geometry, new THREE.MultiMaterial( [ material ] ) );
linesMesh = new THREE.LineSegments( geometry, material );
group.add( linesMesh );
//
......@@ -273,7 +273,7 @@
}
linesMesh.geometry.groups[ 0 ].count = numConnected * 2;
linesMesh.geometry.setDrawRange( 0, numConnected * 2 );
linesMesh.geometry.attributes.position.needsUpdate = true;
linesMesh.geometry.attributes.color.needsUpdate = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册