Explorar o código

VTKLoader: fix different regexp between ES6 module and CJS file

David Peicho %!s(int64=5) %!d(string=hai) anos
pai
achega
919750dd82
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      examples/jsm/loaders/VTKLoader.js

+ 2 - 1
examples/jsm/loaders/VTKLoader.js

@@ -62,7 +62,8 @@ VTKLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 			var result;
 
-			var patWord = /^[^0-9.\s-]+/;
+			// pattern for detecting the end of a number sequence
+			var patWord = /^[^\d.\s-]+/;
 
 			// pattern for reading vertices, 3 floats or integers
 			var pat3Floats = /(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)/g;