Sfoglia il codice sorgente

The PLY format starts with the ply magic word (#23018)

gero3 3 anni fa
parent
commit
bc5bdbc8ea
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      examples/jsm/loaders/PLYLoader.js

+ 1 - 1
examples/jsm/loaders/PLYLoader.js

@@ -88,7 +88,7 @@ class PLYLoader extends Loader {
 
 
 		function parseHeader( data ) {
 		function parseHeader( data ) {
 
 
-			const patternHeader = /ply([\s\S]*)end_header\r?\n/;
+			const patternHeader = /^ply([\s\S]*)end_header\r?\n/;
 			let headerText = '';
 			let headerText = '';
 			let headerLength = 0;
 			let headerLength = 0;
 			const result = patternHeader.exec( data );
 			const result = patternHeader.exec( data );