Browse Source

Renamed Points to PointCloud. See discussion in e58553d1ba2b32dd13b910d8ec3e82a3c8fa82b3.

Mr.doob 11 years ago
parent
commit
99c002a49b

+ 1 - 1
src/extras/renderers/plugins/DepthPassPlugin.js

@@ -115,7 +115,7 @@ THREE.DepthPassPlugin = function () {
 
 				// todo: create proper depth material for particles
 
-				if ( object instanceof THREE.Points && !object.customDepthMaterial ) continue;
+				if ( object instanceof THREE.PointCloud && !object.customDepthMaterial ) continue;
 
 				objectMaterial = getObjectMaterial( object );
 

+ 6 - 6
src/materials/PointsMaterial.js → src/materials/PointCloudMaterial.js

@@ -19,7 +19,7 @@
  * }
  */
 
-THREE.PointsMaterial = function ( parameters ) {
+THREE.PointCloudMaterial = function ( parameters ) {
 
 	THREE.Material.call( this );
 
@@ -38,11 +38,11 @@ THREE.PointsMaterial = function ( parameters ) {
 
 };
 
-THREE.PointsMaterial.prototype = Object.create( THREE.Material.prototype );
+THREE.PointCloudMaterial.prototype = Object.create( THREE.Material.prototype );
 
-THREE.PointsMaterial.prototype.clone = function () {
+THREE.PointCloudMaterial.prototype.clone = function () {
 
-	var material = new THREE.PointsSystemMaterial();
+	var material = new THREE.PointCloudMaterial();
 
 	THREE.Material.prototype.clone.call( this, material );
 
@@ -65,7 +65,7 @@ THREE.PointsMaterial.prototype.clone = function () {
 
 THREE.ParticleSystemMaterial = function ( parameters ) {
 
-	console.warn( 'THREE.ParticleSystemMaterial has been DEPRECATED. Use THREE.PointsMaterial instead.' );
-	return new THREE.PointsMaterial( parameters );
+	console.warn( 'THREE.ParticleSystemMaterial has been DEPRECATED. Use THREE.PointCloudMaterial instead.' );
+	return new THREE.PointCloudMaterial( parameters );
 
 }

+ 7 - 7
src/objects/Points.js → src/objects/PointCloud.js

@@ -2,22 +2,22 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.Points = function ( geometry, material ) {
+THREE.PointCloud = function ( geometry, material ) {
 
 	THREE.Object3D.call( this );
 
 	this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
-	this.material = material !== undefined ? material : new THREE.PointsMaterial( { color: Math.random() * 0xffffff } );
+	this.material = material !== undefined ? material : new THREE.PointCloudMaterial( { color: Math.random() * 0xffffff } );
 
 	this.sortParticles = false;
 
 };
 
-THREE.Points.prototype = Object.create( THREE.Object3D.prototype );
+THREE.PointCloud.prototype = Object.create( THREE.Object3D.prototype );
 
-THREE.Points.prototype.clone = function ( object ) {
+THREE.PointCloud.prototype.clone = function ( object ) {
 
-	if ( object === undefined ) object = new THREE.Points( this.geometry, this.material );
+	if ( object === undefined ) object = new THREE.PointCloud( this.geometry, this.material );
 
 	object.sortParticles = this.sortParticles;
 
@@ -31,7 +31,7 @@ THREE.Points.prototype.clone = function ( object ) {
 
 THREE.ParticleSystem = function ( geometry, material ) {
 
-	console.warn( 'THREE.ParticleSystem has been DEPRECATED. Use THREE.Points instead.' );
-	return new THREE.Points( geometry, material );
+	console.warn( 'THREE.ParticleSystem has been DEPRECATED. Use THREE.PointCloud instead.' );
+	return new THREE.PointCloud( geometry, material );
 
 };

+ 8 - 8
src/renderers/WebGLRenderer.js

@@ -2674,7 +2674,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			}
 
-		} else if ( object instanceof THREE.Points ) {
+		} else if ( object instanceof THREE.PointCloud ) {
 
 			// render particles
 
@@ -3006,7 +3006,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		// render particles
 
-		} else if ( object instanceof THREE.Points ) {
+		} else if ( object instanceof THREE.PointCloud ) {
 
 			_gl.drawArrays( _gl.POINTS, 0, geometryGroup.__webglParticleCount );
 
@@ -3762,7 +3762,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 					}
 
-				} else if ( object instanceof THREE.Points ) {
+				} else if ( object instanceof THREE.PointCloud ) {
 
 					if ( ! geometry.__webglVertexBuffer ) {
 
@@ -3803,7 +3803,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 				}
 
 			} else if ( object instanceof THREE.Line ||
-						object instanceof THREE.Points ) {
+						object instanceof THREE.PointCloud ) {
 
 				geometry = object.geometry;
 				addBuffer( scene.__webglObjects, geometry, object );
@@ -3927,7 +3927,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 			material.attributes && clearCustomAttributes( material );
 
 
-		} else if ( object instanceof THREE.Points ) {
+		} else if ( object instanceof THREE.PointCloud ) {
 
 			material = getBufferMaterial( object, geometry );
 
@@ -3977,7 +3977,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 	function removeObject( object, scene ) {
 
 		if ( object instanceof THREE.Mesh  ||
-			 object instanceof THREE.Points ||
+			 object instanceof THREE.PointCloud ||
 			 object instanceof THREE.Line ) {
 
 			removeInstances( scene.__webglObjects, object );
@@ -4064,7 +4064,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			shaderID = 'dashed';
 
-		} else if ( material instanceof THREE.PointsMaterial ) {
+		} else if ( material instanceof THREE.PointCloudMaterial ) {
 
 			shaderID = 'particle_basic';
 
@@ -4400,7 +4400,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 				refreshUniformsLine( m_uniforms, material );
 				refreshUniformsDash( m_uniforms, material );
 
-			} else if ( material instanceof THREE.PointsMaterial ) {
+			} else if ( material instanceof THREE.PointCloudMaterial ) {
 
 				refreshUniformsParticle( m_uniforms, material );
 

+ 0 - 1
utils/build/includes/canvas.json

@@ -43,7 +43,6 @@
 	"src/materials/MeshDepthMaterial.js",
 	"src/materials/MeshNormalMaterial.js",
 	"src/materials/MeshFaceMaterial.js",
-	"src/materials/PointsMaterial.js",
 	"src/materials/SpriteMaterial.js",
 	"src/materials/SpriteCanvasMaterial.js",
 	"src/textures/Texture.js",

+ 2 - 2
utils/build/includes/common.json

@@ -57,7 +57,7 @@
 	"src/materials/MeshDepthMaterial.js",
 	"src/materials/MeshNormalMaterial.js",
 	"src/materials/MeshFaceMaterial.js",
-	"src/materials/PointsMaterial.js",
+	"src/materials/PointCloudMaterial.js",
 	"src/materials/ShaderMaterial.js",
 	"src/materials/RawShaderMaterial.js",
 	"src/materials/SpriteMaterial.js",
@@ -65,7 +65,7 @@
 	"src/textures/Texture.js",
 	"src/textures/CompressedTexture.js",
 	"src/textures/DataTexture.js",
-	"src/objects/Points.js",
+	"src/objects/PointCloud.js",
 	"src/objects/Line.js",
 	"src/objects/Mesh.js",
 	"src/objects/Bone.js",

+ 2 - 2
utils/build/includes/webgl.json

@@ -49,14 +49,14 @@
 	"src/materials/MeshDepthMaterial.js",
 	"src/materials/MeshNormalMaterial.js",
 	"src/materials/MeshFaceMaterial.js",
-	"src/materials/PointsMaterial.js",
+	"src/materials/PointCloudMaterial.js",
 	"src/materials/ShaderMaterial.js",
 	"src/materials/RawShaderMaterial.js",
 	"src/materials/SpriteMaterial.js",
 	"src/textures/Texture.js",
 	"src/textures/CompressedTexture.js",
 	"src/textures/DataTexture.js",
-	"src/objects/Points.js",
+	"src/objects/PointCloud.js",
 	"src/objects/Line.js",
 	"src/objects/Mesh.js",
 	"src/objects/Bone.js",