Browse Source

Fix PLYExporter includeIndices LGTM warning

Garrett Johnson 7 years ago
parent
commit
52c9fb52fb
1 changed files with 1 additions and 2 deletions
  1. 1 2
      examples/js/exporters/PLYExporter.js

+ 1 - 2
examples/js/exporters/PLYExporter.js

@@ -73,7 +73,6 @@ THREE.PLYExporter.prototype = {
 		var includeNormals = false;
 		var includeColors = false;
 		var includeUVs = false;
-		var includeIndices = true;
 
 		// count the vertices, check which properties are used,
 		// and cache the BufferGeometry
@@ -123,10 +122,10 @@ THREE.PLYExporter.prototype = {
 
 		} );
 
+		var includeIndices = excludeAttributes.indexOf( 'index' ) === - 1;
 		includeNormals = includeNormals && excludeAttributes.indexOf( 'normal' ) === - 1;
 		includeColors = includeColors && excludeAttributes.indexOf( 'color' ) === - 1;
 		includeUVs = includeUVs && excludeAttributes.indexOf( 'uv' ) === - 1;
-		includeIndices = includeIndices && excludeAttributes.indexOf( 'index' ) === - 1;
 
 
 		if ( includeIndices && faceCount !== Math.floor( faceCount ) ) {