Browse Source

Merge pull request #19456 from Mugen87/dev49

GLTFExporter: Clean up.
Michael Herzog 5 years ago
parent
commit
9db3d4f76e
2 changed files with 6 additions and 6 deletions
  1. 3 3
      examples/js/exporters/GLTFExporter.js
  2. 3 3
      examples/jsm/exporters/GLTFExporter.js

+ 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 );
 
 					}