Browse Source

Merge pull request #18054 from Mugen87/dev29

PLYExporter: Make exported data more compatible for other software.
Mr.doob 5 years ago
parent
commit
ff33e747da
2 changed files with 4 additions and 4 deletions
  1. 2 2
      examples/js/exporters/PLYExporter.js
  2. 2 2
      examples/jsm/exporters/PLYExporter.js

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

@@ -205,7 +205,7 @@ THREE.PLYExporter.prototype = {
 			// faces
 			header +=
 				`element face ${faceCount}\n` +
-				`property list uchar uint${ indexByteCount * 8 } vertex_index\n`;
+				`property list uchar int vertex_index\n`;
 
 		}
 
@@ -537,7 +537,7 @@ THREE.PLYExporter.prototype = {
 
 			} );
 
-			result = `${ header }${vertexList}\n${ includeIndices ? `${faceList}\n` : '' }`;
+			result = `${ header }${vertexList}${ includeIndices ? `${faceList}\n` : '\n' }`;
 
 		}
 

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

@@ -211,7 +211,7 @@ PLYExporter.prototype = {
 			// faces
 			header +=
 				`element face ${faceCount}\n` +
-				`property list uchar uint${ indexByteCount * 8 } vertex_index\n`;
+				`property list uchar int vertex_index\n`;
 
 		}
 
@@ -543,7 +543,7 @@ PLYExporter.prototype = {
 
 			} );
 
-			result = `${ header }${vertexList}\n${ includeIndices ? `${faceList}\n` : '' }`;
+			result = `${ header }${vertexList}${ includeIndices ? `${faceList}\n` : '\n' }`;
 
 		}