Jelajahi Sumber

GLTFExporter: Clean up.

Mugen87 5 tahun lalu
induk
melakukan
1969817095

+ 3 - 3
examples/js/exporters/GLTFExporter.js

@@ -517,9 +517,9 @@ THREE.GLTFExporter.prototype = {
 					} else {
 
 						if ( a === 0 ) value = attribute.getX( i );
-						if ( a === 1 ) value = attribute.getY( i );
-						if ( a === 2 ) value = attribute.getZ( i );
-						if ( a === 3 ) value = attribute.getW( i );
+						else if ( a === 1 ) value = attribute.getY( i );
+						else if ( a === 2 ) value = attribute.getZ( i );
+						else if ( a === 3 ) value = attribute.getW( i );
 
 					}
 

+ 3 - 3
examples/jsm/exporters/GLTFExporter.js

@@ -539,9 +539,9 @@ GLTFExporter.prototype = {
 					} else {
 
 						if ( a === 0 ) value = attribute.getX( i );
-						if ( a === 1 ) value = attribute.getY( i );
-						if ( a === 2 ) value = attribute.getZ( i );
-						if ( a === 3 ) value = attribute.getW( i );
+						else if ( a === 1 ) value = attribute.getY( i );
+						else if ( a === 2 ) value = attribute.getZ( i );
+						else if ( a === 3 ) value = attribute.getW( i );
 
 					}