From 11df318732ebdc2c0ee697b0e523f32887f29b5e Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Wed, 9 Aug 2023 16:57:23 +0200 Subject: [PATCH 1/2] GltfLoader: log error when loader extension doesnt have a name --- examples/jsm/loaders/GLTFLoader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 2adbf58beb2f2b..6e72325f3fd178 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -361,6 +361,9 @@ class GLTFLoader extends Loader { for ( let i = 0; i < this.pluginCallbacks.length; i ++ ) { const plugin = this.pluginCallbacks[ i ]( parser ); + + if ( ! plugin.name ) console.error( 'THREE.GLTFLoader: Invalid plugin found: missing name', plugin ); + plugins[ plugin.name ] = plugin; // Workaround to avoid determining as unknown extension From 17bc4975e306787efb808bc249bd65960f844556 Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Sun, 27 Aug 2023 20:15:39 +0200 Subject: [PATCH 2/2] remove object from error log --- examples/jsm/loaders/GLTFLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 6e72325f3fd178..25ec77dbdef61f 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -362,7 +362,7 @@ class GLTFLoader extends Loader { const plugin = this.pluginCallbacks[ i ]( parser ); - if ( ! plugin.name ) console.error( 'THREE.GLTFLoader: Invalid plugin found: missing name', plugin ); + if ( ! plugin.name ) console.error( 'THREE.GLTFLoader: Invalid plugin found: missing name' ); plugins[ plugin.name ] = plugin;