2
0
Эх сурвалжийг харах

Merge pull request #17807 from mrdoob/revert-17739-dev11

Revert "ParametricGeometry: Added serialization/deserialization support."
Michael Herzog 5 жил өмнө
parent
commit
e69acab39b

+ 0 - 19
src/geometries/ParametricGeometry.js

@@ -33,16 +33,6 @@ function ParametricGeometry( func, slices, stacks ) {
 ParametricGeometry.prototype = Object.create( Geometry.prototype );
 ParametricGeometry.prototype.constructor = ParametricGeometry;
 
-ParametricGeometry.prototype.toJSON = function () {
-
-	var data = Geometry.prototype.toJSON.call( this );
-
-	data.func = this.parameters.func.toString();
-
-	return data;
-
-};
-
 // ParametricBufferGeometry
 
 function ParametricBufferGeometry( func, slices, stacks ) {
@@ -169,14 +159,5 @@ function ParametricBufferGeometry( func, slices, stacks ) {
 ParametricBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
 ParametricBufferGeometry.prototype.constructor = ParametricBufferGeometry;
 
-ParametricBufferGeometry.prototype.toJSON = function () {
-
-	var data = BufferGeometry.prototype.toJSON.call( this );
-
-	data.func = this.parameters.func.toString();
-
-	return data;
-
-};
 
 export { ParametricGeometry, ParametricBufferGeometry };

+ 0 - 13
src/loaders/ObjectLoader.js

@@ -410,19 +410,6 @@ ObjectLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 						break;
 
-					case 'ParametricGeometry':
-					case 'ParametricBufferGeometry':
-
-						var func = new Function( 'return ' + data.func )();
-
-						geometry = new Geometries[ data.type ](
-							func,
-							data.slices,
-							data.stacks
-						);
-
-						break;
-
 					case 'BufferGeometry':
 					case 'InstancedBufferGeometry':