Browse Source

Updated builds.

Mr.doob 2 years ago
parent
commit
af97c8ae55
5 changed files with 63 additions and 6 deletions
  1. 21 2
      build/three.cjs
  2. 21 2
      build/three.js
  3. 0 0
      build/three.min.js
  4. 21 2
      build/three.module.js
  5. 0 0
      build/three.module.min.js

+ 21 - 2
build/three.cjs

@@ -42511,9 +42511,28 @@ class DataTextureLoader extends Loader {
 		loader.setWithCredentials( scope.withCredentials );
 		loader.load( url, function ( buffer ) {
 
-			const texData = scope.parse( buffer ); // TODO: Use try/catch here and throw errors in derived loaders, see #26412
+			let texData;
 
-			if ( ! texData ) return onError();
+			try {
+
+				texData = scope.parse( buffer );
+
+			} catch ( error ) {
+
+				if ( onError !== undefined ) {
+
+					onError( error );
+
+				} else {
+
+					console.error( error );
+					return;
+
+				}
+
+			}
+
+			if ( ! texData ) return onError(); // TODO: Remove this when all loaders properly throw errors
 
 			if ( texData.image !== undefined ) {
 

+ 21 - 2
build/three.js

@@ -42516,9 +42516,28 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			loader.setWithCredentials( scope.withCredentials );
 			loader.load( url, function ( buffer ) {
 
-				const texData = scope.parse( buffer ); // TODO: Use try/catch here and throw errors in derived loaders, see #26412
+				let texData;
 
-				if ( ! texData ) return onError();
+				try {
+
+					texData = scope.parse( buffer );
+
+				} catch ( error ) {
+
+					if ( onError !== undefined ) {
+
+						onError( error );
+
+					} else {
+
+						console.error( error );
+						return;
+
+					}
+
+				}
+
+				if ( ! texData ) return onError(); // TODO: Remove this when all loaders properly throw errors
 
 				if ( texData.image !== undefined ) {
 

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 21 - 2
build/three.module.js

@@ -42509,9 +42509,28 @@ class DataTextureLoader extends Loader {
 		loader.setWithCredentials( scope.withCredentials );
 		loader.load( url, function ( buffer ) {
 
-			const texData = scope.parse( buffer ); // TODO: Use try/catch here and throw errors in derived loaders, see #26412
+			let texData;
 
-			if ( ! texData ) return onError();
+			try {
+
+				texData = scope.parse( buffer );
+
+			} catch ( error ) {
+
+				if ( onError !== undefined ) {
+
+					onError( error );
+
+				} else {
+
+					console.error( error );
+					return;
+
+				}
+
+			}
+
+			if ( ! texData ) return onError(); // TODO: Remove this when all loaders properly throw errors
 
 			if ( texData.image !== undefined ) {
 

File diff suppressed because it is too large
+ 0 - 0
build/three.module.min.js


Some files were not shown because too many files changed in this diff