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

Examples: Fix toJSON() methods for certain node classes.

Mugen87 4 жил өмнө
parent
commit
60306cf826

+ 4 - 10
examples/jsm/nodes/utils/TimerNode.js

@@ -77,18 +77,12 @@ TimerNode.prototype.copy = function ( source ) {
 
 
 TimerNode.prototype.toJSON = function ( meta ) {
 TimerNode.prototype.toJSON = function ( meta ) {
 
 
-	var data = this.getJSONNode( meta );
+	var data = FloatNode.prototype.toJSON.call( this, meta );
 
 
-	if ( ! data ) {
+	data.scope = this.scope;
+	data.scale = this.scale;
 
 
-		data = this.createJSONNode( meta );
-
-		data.scope = this.scope;
-		data.scale = this.scale;
-
-		data.timeScale = this.timeScale;
-
-	}
+	data.timeScale = this.timeScale;
 
 
 	return data;
 	return data;
 
 

+ 4 - 10
examples/jsm/nodes/utils/VelocityNode.js

@@ -154,18 +154,12 @@ VelocityNode.prototype.copy = function ( source ) {
 
 
 VelocityNode.prototype.toJSON = function ( meta ) {
 VelocityNode.prototype.toJSON = function ( meta ) {
 
 
-	var data = this.getJSONNode( meta );
+	var data = Vector3Node.prototype.toJSON.call( this, meta );
 
 
-	if ( ! data ) {
+	if ( this.target ) data.target = this.target.uuid;
 
 
-		data = this.createJSONNode( meta );
-
-		if ( this.target ) data.target = this.target.uuid;
-
-		// clone params
-		data.params = JSON.parse( JSON.stringify( this.params ) );
-
-	}
+	// clone params
+	data.params = JSON.parse( JSON.stringify( this.params ) );
 
 
 	return data;
 	return data;
 
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
examples/nodes/caustic.json


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
examples/nodes/displace.json


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
examples/nodes/wave.json


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно