|
@@ -696,8 +696,16 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
if ( ! loader ) {
|
|
|
|
|
|
- // Assumes that the extension is optional and that a fallback texture is present; ideally we should handle extensionsRequired better
|
|
|
- return null;
|
|
|
+ if ( json.extensionsRequired && json.extensionsRequired.includes( this.name ) ) {
|
|
|
+
|
|
|
+ throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ // Assumes that the extension is optional and that a fallback texture is present
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|