提交 7ca1f55b 编写于 作者: A Amos

have STLLoader pass on withCredentials to internal FileLoader

上级 ecd58d7d
......@@ -69,12 +69,7 @@ THREE.STLLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
loader.setPath( scope.path );
loader.setResponseType( 'arraybuffer' );
loader.setRequestHeader( this.requestHeader );
if ( scope.crossOrigin === 'use-credentials' ) {
loader.setWithCredentials( true );
}
loader.setWithCredentials( scope.withCredentials );
loader.load( url, function ( text ) {
......
......@@ -77,12 +77,7 @@ STLLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
loader.setPath( scope.path );
loader.setResponseType( 'arraybuffer' );
loader.setRequestHeader( this.requestHeader );
if ( scope.crossOrigin === 'use-credentials' ) {
loader.setWithCredentials( true );
}
loader.setWithCredentials( scope.withCredentials );
loader.load( url, function ( text ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册