瀏覽代碼

Updated particle example to use the renamed ParticleSystem name - PointCloud. This fixes the rotation that happens in the update because it relies on instanceof.

Michael Guerrero 11 年之前
父節點
當前提交
57328e89ce
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      examples/webgl_particles_sprites.html

+ 3 - 3
examples/webgl_particles_sprites.html

@@ -99,10 +99,10 @@
 					sprite = parameters[i][1];
 					sprite = parameters[i][1];
 					size   = parameters[i][2];
 					size   = parameters[i][2];
 
 
-					materials[i] = new THREE.ParticleSystemMaterial( { size: size, map: sprite, blending: THREE.AdditiveBlending, depthTest: false, transparent : true } );
+					materials[i] = new THREE.PointCloudMaterial( { size: size, map: sprite, blending: THREE.AdditiveBlending, depthTest: false, transparent : true } );
 					materials[i].color.setHSL( color[0], color[1], color[2] );
 					materials[i].color.setHSL( color[0], color[1], color[2] );
 
 
-					particles = new THREE.ParticleSystem( geometry, materials[i] );
+					particles = new THREE.PointCloud( geometry, materials[i] );
 
 
 					particles.rotation.x = Math.random() * 6;
 					particles.rotation.x = Math.random() * 6;
 					particles.rotation.y = Math.random() * 6;
 					particles.rotation.y = Math.random() * 6;
@@ -200,7 +200,7 @@
 
 
 					var object = scene.children[ i ];
 					var object = scene.children[ i ];
 
 
-					if ( object instanceof THREE.ParticleSystem ) {
+					if ( object instanceof THREE.PointCloud ) {
 
 
 						object.rotation.y = time * ( i < 4 ? i + 1 : - ( i + 1 ) );
 						object.rotation.y = time * ( i < 4 ? i + 1 : - ( i + 1 ) );