From 21e9d48c5de56389963b6239e9811c5b1120b1b3 Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Tue, 19 May 2026 09:13:17 +0900 Subject: [PATCH 1/2] Deprecate "setDecoderConfig" function --- examples/jsm/libs/draco/README.md | 1 - examples/jsm/loaders/DRACOLoader.js | 1 + examples/webgl_loader_3dtiles.html | 1 - examples/webgl_loader_draco.html | 1 - examples/webgl_postprocessing_gtao.html | 1 - examples/webgl_postprocessing_ssr.html | 1 - examples/webgpu_caustics.html | 1 - examples/webgpu_postprocessing_ao.html | 1 - examples/webgpu_postprocessing_ssr.html | 1 - examples/webgpu_upscaling_fsr1.html | 1 - examples/webgpu_upscaling_taau.html | 1 - examples/webgpu_volume_caustics.html | 1 - 12 files changed, 1 insertion(+), 11 deletions(-) diff --git a/examples/jsm/libs/draco/README.md b/examples/jsm/libs/draco/README.md index 4d891646db2fad..40b6ce0fabd709 100644 --- a/examples/jsm/libs/draco/README.md +++ b/examples/jsm/libs/draco/README.md @@ -22,7 +22,6 @@ Either variation may be used with `DRACOLoader`: ```js var dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath('path/to/decoders/'); -dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support. ``` Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder). diff --git a/examples/jsm/loaders/DRACOLoader.js b/examples/jsm/loaders/DRACOLoader.js index 4636d0a38e7830..19e564884b6d4c 100644 --- a/examples/jsm/loaders/DRACOLoader.js +++ b/examples/jsm/loaders/DRACOLoader.js @@ -107,6 +107,7 @@ class DRACOLoader extends Loader { */ setDecoderConfig( config ) { + console.warn( 'THREE.DRACOLoader: setDecoderConfig to has been deprecated and will be removed in r194.' ); this.decoderConfig = config; return this; diff --git a/examples/webgl_loader_3dtiles.html b/examples/webgl_loader_3dtiles.html index ed914565cea173..460a077fa83dc8 100644 --- a/examples/webgl_loader_3dtiles.html +++ b/examples/webgl_loader_3dtiles.html @@ -123,7 +123,6 @@ // loader const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/gltf/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const DEG2RAD = Math.PI / 180; diff --git a/examples/webgl_loader_draco.html b/examples/webgl_loader_draco.html index ac514c250731e3..c7f1ae09377ea0 100644 --- a/examples/webgl_loader_draco.html +++ b/examples/webgl_loader_draco.html @@ -39,7 +39,6 @@ // Configure and create Draco decoder. const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); init(); diff --git a/examples/webgl_postprocessing_gtao.html b/examples/webgl_postprocessing_gtao.html index 18f46f835ace7d..ca98d91459dbf2 100644 --- a/examples/webgl_postprocessing_gtao.html +++ b/examples/webgl_postprocessing_gtao.html @@ -55,7 +55,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); loader.setPath( 'models/gltf/' ); diff --git a/examples/webgl_postprocessing_ssr.html b/examples/webgl_postprocessing_ssr.html index 5ba6475d6f999e..9345e5cabf7a52 100644 --- a/examples/webgl_postprocessing_ssr.html +++ b/examples/webgl_postprocessing_ssr.html @@ -66,7 +66,6 @@ // Configure and create Draco decoder. const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); init(); diff --git a/examples/webgpu_caustics.html b/examples/webgpu_caustics.html index 629eef60cc52a8..2daa00f3b20f49 100644 --- a/examples/webgpu_caustics.html +++ b/examples/webgpu_caustics.html @@ -78,7 +78,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); gltf = ( await new GLTFLoader().setDRACOLoader( dracoLoader ).loadAsync( './models/gltf/duck.glb' ) ).scene; gltf.scale.setScalar( .5 ); diff --git a/examples/webgpu_postprocessing_ao.html b/examples/webgpu_postprocessing_ao.html index e24cd203915a0e..093cea8489ed48 100644 --- a/examples/webgpu_postprocessing_ao.html +++ b/examples/webgpu_postprocessing_ao.html @@ -160,7 +160,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); loader.setPath( 'models/gltf/' ); diff --git a/examples/webgpu_postprocessing_ssr.html b/examples/webgpu_postprocessing_ssr.html index 25827e3bb5e4e6..31415ac0ed92a9 100644 --- a/examples/webgpu_postprocessing_ssr.html +++ b/examples/webgpu_postprocessing_ssr.html @@ -79,7 +79,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); diff --git a/examples/webgpu_upscaling_fsr1.html b/examples/webgpu_upscaling_fsr1.html index 575200924f6b77..c8d158bae071c3 100644 --- a/examples/webgpu_upscaling_fsr1.html +++ b/examples/webgpu_upscaling_fsr1.html @@ -71,7 +71,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); diff --git a/examples/webgpu_upscaling_taau.html b/examples/webgpu_upscaling_taau.html index 01aafaee5213b4..3143b58cd5969e 100644 --- a/examples/webgpu_upscaling_taau.html +++ b/examples/webgpu_upscaling_taau.html @@ -74,7 +74,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); diff --git a/examples/webgpu_volume_caustics.html b/examples/webgpu_volume_caustics.html index 148e30eeed4a93..5e554391859a96 100644 --- a/examples/webgpu_volume_caustics.html +++ b/examples/webgpu_volume_caustics.html @@ -86,7 +86,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); gltf = ( await new GLTFLoader().setDRACOLoader( dracoLoader ).loadAsync( './models/gltf/duck.glb' ) ).scene; gltf.scale.setScalar( .5 ); From b3de1d214198bf0c511d91a3e8b83eb4999e2ec5 Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Tue, 19 May 2026 09:15:01 +0900 Subject: [PATCH 2/2] Add comment --- examples/jsm/loaders/DRACOLoader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/jsm/loaders/DRACOLoader.js b/examples/jsm/loaders/DRACOLoader.js index 19e564884b6d4c..265bb6d1ffd580 100644 --- a/examples/jsm/loaders/DRACOLoader.js +++ b/examples/jsm/loaders/DRACOLoader.js @@ -102,6 +102,7 @@ class DRACOLoader extends Loader { /** * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. * + * @deprecated * @param {{type:('js'|'wasm')}} config - The decoder config. * @return {DRACOLoader} A reference to this loader. */