Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 12, 2025
1 parent 3f29e85 commit efa0fbd
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/three/TilesRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,24 +644,14 @@ export class TilesRenderer extends TilesRendererBase {
case 'glb': {

const loader = manager.getHandler( 'path.gltf' ) || manager.getHandler( 'path.glb' ) || new GLTFLoader( manager );
loader.setWithCredentials( fetchOptions.credentials === 'include' );

Check failure on line 647 in src/three/TilesRenderer.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Trailing spaces not allowed

Check failure on line 647 in src/three/TilesRenderer.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Trailing spaces not allowed
loader.setRequestHeader( fetchOptions.headers || {} );
if ( fetchOptions.credentials === 'include' && fetchOptions.mode === 'cors' ) {

loader.setCrossOrigin( 'use-credentials' );

Check failure on line 652 in src/three/TilesRenderer.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Trailing spaces not allowed

Check failure on line 652 in src/three/TilesRenderer.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Trailing spaces not allowed
}

if ( 'credentials' in fetchOptions ) {

loader.setWithCredentials( fetchOptions.credentials === 'include' );

}

if ( fetchOptions.headers ) {

loader.setRequestHeader( fetchOptions.headers );

}


// assume any pre-registered loader has paths configured as the user desires, but if we're making
// a new loader, use the working path during parse to support relative uris on other hosts
let resourcePath = loader.resourcePath || loader.path || workingPath;
Expand Down

0 comments on commit efa0fbd

Please sign in to comment.