Skip to content

Commit

Permalink
[three] - workaround path trailing slash assumption in LoaderUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Buchhofer committed Mar 14, 2022
1 parent ddf0fa0 commit e557a24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/three/GLTFExtensionLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ export class GLTFExtensionLoader extends LoaderBase {

// 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
const resourcePath = loader.resourcePath || loader.path || this.workingPath;
let resourcePath = loader.resourcePath || loader.path || this.workingPath;
if ( ! /[\\/]$/.test( resourcePath ) ) {

resourcePath += '/';

}

loader.parse( buffer, resourcePath, model => {

Expand Down

0 comments on commit e557a24

Please sign in to comment.