Kaynağa Gözat

DRACOLoader: Deprecate "setDecoderConfig" function (#33602)

Garrett Johnson 2 hafta önce
ebeveyn
işleme
7a4fa16c7b

+ 0 - 1
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).

+ 2 - 0
examples/jsm/loaders/DRACOLoader.js

@@ -102,11 +102,13 @@ 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.
 	 */
 	setDecoderConfig( config ) {
 
+		console.warn( 'THREE.DRACOLoader: setDecoderConfig to has been deprecated and will be removed in r194.' );
 		this.decoderConfig = config;
 
 		return this;

+ 0 - 1
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;
 

+ 0 - 1
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();
 

+ 0 - 1
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/' );

+ 0 - 1
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();
 

+ 0 - 1
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 );

+ 0 - 1
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/' );

+ 0 - 1
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 );

+ 0 - 1
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 );
 

+ 0 - 1
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 );
 

+ 0 - 1
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 );

粤ICP备19079148号