|
@@ -160,6 +160,12 @@ var GLTFLoader = ( function () {
|
|
loader.setPath( this.path );
|
|
loader.setPath( this.path );
|
|
loader.setResponseType( 'arraybuffer' );
|
|
loader.setResponseType( 'arraybuffer' );
|
|
|
|
|
|
|
|
+ if ( this.options.crossOrigin === 'use-credentials' ) {
|
|
|
|
+
|
|
|
|
+ this.fileLoader.setWithCredentials( true );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
loader.load( url, function ( data ) {
|
|
loader.load( url, function ( data ) {
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -1701,6 +1707,12 @@ var GLTFLoader = ( function () {
|
|
this.fileLoader = new FileLoader( this.options.manager );
|
|
this.fileLoader = new FileLoader( this.options.manager );
|
|
this.fileLoader.setResponseType( 'arraybuffer' );
|
|
this.fileLoader.setResponseType( 'arraybuffer' );
|
|
|
|
|
|
|
|
+ if ( this.options.crossOrigin === 'use-credentials' ) {
|
|
|
|
+
|
|
|
|
+ this.fileLoader.setWithCredentials( true );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
GLTFParser.prototype.parse = function ( onLoad, onError ) {
|
|
GLTFParser.prototype.parse = function ( onLoad, onError ) {
|