Browse Source

DRACOLoader2: Add credentials header.

Don McCurdy 6 years ago
parent
commit
a7fa6c39d7
1 changed files with 10 additions and 0 deletions
  1. 10 0
      examples/js/loaders/DRACOLoader2.js

+ 10 - 0
examples/js/loaders/DRACOLoader2.js

@@ -103,6 +103,12 @@ THREE.DRACOLoader.prototype = {
 
 		loader.setResponseType( 'arraybuffer' );
 
+		if ( this.crossOrigin === 'use-credentials' ) {
+
+			loader.setWithCredentials( true );
+
+		}
+
 		loader.load( url, ( buffer ) => {
 
 			var taskConfig = {
@@ -553,24 +559,28 @@ THREE.DRACOLoader.DRACOWorker = function () {
 
 /** Deprecated static methods */
 
+/** @deprecated */
 THREE.DRACOLoader.setDecoderPath = function () {
 
 	console.warn( 'THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.' );
 
 };
 
+/** @deprecated */
 THREE.DRACOLoader.setDecoderConfig = function () {
 
 	console.warn( 'THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.' );
 
 };
 
+/** @deprecated */
 THREE.DRACOLoader.releaseDecoderModule = function () {
 
 	console.warn( 'THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.' );
 
 };
 
+/** @deprecated */
 THREE.DRACOLoader.getDecoderModule = function () {
 
 	console.warn( 'THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.' );