diff --git a/examples/jsm/loaders/USDZLoader.js b/examples/jsm/loaders/USDZLoader.js index cdc8cec9faede1..aa80615495338d 100644 --- a/examples/jsm/loaders/USDZLoader.js +++ b/examples/jsm/loaders/USDZLoader.js @@ -182,8 +182,7 @@ class USDZLoader extends Loader { if ( isCrateFile( zip[ filename ] ) ) { - console.warn( 'THREE.USDZLoader: Crate files (.usdc or binary .usd) are not supported.' ); - continue; + throw Error( 'THREE.USDZLoader: Crate files (.usdc or binary .usd) are not supported.' ); } @@ -242,12 +241,10 @@ class USDZLoader extends Loader { if ( isCrate ) { - console.warn( 'THREE.USDZLoader: Crate files (.usdc or binary .usd) are not supported.' ); + throw Error( 'THREE.USDZLoader: Crate files (.usdc or binary .usd) are not supported.' ); } - return undefined; - } const zip = fflate.unzipSync( new Uint8Array( buffer ) ); @@ -260,15 +257,6 @@ class USDZLoader extends Loader { const file = findUSD( zip ); - if ( file === undefined ) { - - console.warn( 'THREE.USDZLoader: No usda file found.' ); - - return new Group(); - - } - - // Parse file const text = fflate.strFromU8( file );