2
0
Эх сурвалжийг харах

ColladaLoader2: More robust parseFloats/parseInts.

Mr.doob 9 жил өмнө
parent
commit
39f349a584

+ 4 - 0
examples/js/loaders/ColladaLoader2.js

@@ -76,6 +76,8 @@ THREE.ColladaLoader.prototype = {
 
 		function parseFloats( text ) {
 
+			if ( text.length === 0 ) return [];
+
 			var parts = text.trim().split( /\s+/ );
 			var array = new Array( parts.length );
 
@@ -91,6 +93,8 @@ THREE.ColladaLoader.prototype = {
 
 		function parseInts( text ) {
 
+			if ( text.length === 0 ) return [];
+
 			var parts = text.trim().split( /\s+/ );
 			var array = new Array( parts.length );