Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions examples/js/loaders/ColladaLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ THREE.ColladaLoader.prototype = {

var scope = this;

var path = scope.path === undefined ? THREE.LoaderUtils.extractUrlBase( url ) : scope.path;
var path = ( scope.path === undefined ) ? THREE.LoaderUtils.extractUrlBase( url ) : scope.path;

var loader = new THREE.FileLoader( scope.manager );
loader.load( url, function ( text ) {
Copy link
Collaborator Author

@Mugen87 Mugen87 Sep 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, wait. setPath() should affect the original file request, right? Then we need something like this, correct?

loader.setPath( scope.path );
loader.load( url, function ( text ) {

Expand All @@ -37,6 +37,13 @@ THREE.ColladaLoader.prototype = {

},

setResourcePath: function ( value ) {

this.resourcePath = value;
return this;

},

options: {

set convertUpAxis( value ) {
Expand Down Expand Up @@ -3801,14 +3808,14 @@ THREE.ColladaLoader.prototype = {

var asset = parseAsset( getElementsByTagName( collada, 'asset' )[ 0 ] );
var textureLoader = new THREE.TextureLoader( this.manager );
textureLoader.setPath( path ).setCrossOrigin( this.crossOrigin );
textureLoader.setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin );

var tgaLoader;

if ( THREE.TGALoader ) {

tgaLoader = new THREE.TGALoader( this.manager );
tgaLoader.setPath( path );
tgaLoader.setPath( this.resourcePath || path );

}

Expand Down