Browse Source

Moved Points legacy code.

Mr.doob 9 years ago
parent
commit
7cc66e6616
2 changed files with 17 additions and 16 deletions
  1. 17 0
      src/Three.Legacy.js
  2. 0 16
      src/objects/Points.js

+ 17 - 0
src/Three.Legacy.js

@@ -223,6 +223,23 @@ Object.defineProperties( THREE.Object3D.prototype, {
 
 //
 
+Object.defineProperties( THREE, {
+	PointCloud: {
+		value: function ( geometry, material ) {
+			console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
+			return new THREE.Points( geometry, material );
+		}
+	},
+	ParticleSystem: {
+		value: function ( geometry, material ) {
+			console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
+			return new THREE.Points( geometry, material );
+		}
+	}
+} );
+
+//
+
 Object.defineProperties( THREE.Light.prototype, {
 	onlyShadow: {
 		set: function ( value ) {

+ 0 - 16
src/objects/Points.js

@@ -121,19 +121,3 @@ THREE.Points.prototype.clone = function () {
 	return new this.constructor( this.geometry, this.material ).copy( this );
 
 };
-
-// Backwards compatibility
-
-THREE.PointCloud = function ( geometry, material ) {
-
-	console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
-	return new THREE.Points( geometry, material );
-
-};
-
-THREE.ParticleSystem = function ( geometry, material ) {
-
-	console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
-	return new THREE.Points( geometry, material );
-
-};