Browse Source

Geometry/BufferGeometry: "Flatten" cloned geometries. See #7416 #7535.

Mr.doob 9 years ago
parent
commit
ae4c5198fd
2 changed files with 8 additions and 0 deletions
  1. 4 0
      src/core/BufferGeometry.js
  2. 4 0
      src/core/Geometry.js

+ 4 - 0
src/core/BufferGeometry.js

@@ -975,6 +975,7 @@ THREE.BufferGeometry.prototype = {
 
 	clone: function () {
 
+		/*
 		// Handle primitives
 
 		var parameters = this.parameters;
@@ -996,6 +997,9 @@ THREE.BufferGeometry.prototype = {
 		}
 
 		return new this.constructor().copy( this );
+		*/
+
+		return new THREE.BufferGeometry().copy( this );
 
 	},
 

+ 4 - 0
src/core/Geometry.js

@@ -1104,6 +1104,7 @@ THREE.Geometry.prototype = {
 
 	clone: function () {
 
+		/*
 		// Handle primitives
 
 		var parameters = this.parameters;
@@ -1125,6 +1126,9 @@ THREE.Geometry.prototype = {
 		}
 
 		return new this.constructor().copy( this );
+		*/
+
+		return new THREE.Geometry().copy( this );
 
 	},