File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ THREE.ColladaLoader.prototype = {
1919
2020 var scope = this ;
2121
22- var path = scope . path === undefined ? THREE . LoaderUtils . extractUrlBase ( url ) : scope . path ;
22+ var path = ( scope . path === undefined ) ? THREE . LoaderUtils . extractUrlBase ( url ) : scope . path ;
2323
2424 var loader = new THREE . FileLoader ( scope . manager ) ;
2525 loader . load ( url , function ( text ) {
@@ -37,6 +37,13 @@ THREE.ColladaLoader.prototype = {
3737
3838 } ,
3939
40+ setResourcePath : function ( value ) {
41+
42+ this . resourcePath = value ;
43+ return this ;
44+
45+ } ,
46+
4047 options : {
4148
4249 set convertUpAxis ( value ) {
@@ -3801,14 +3808,14 @@ THREE.ColladaLoader.prototype = {
38013808
38023809 var asset = parseAsset ( getElementsByTagName ( collada , 'asset' ) [ 0 ] ) ;
38033810 var textureLoader = new THREE . TextureLoader ( this . manager ) ;
3804- textureLoader . setPath ( path ) . setCrossOrigin ( this . crossOrigin ) ;
3811+ textureLoader . setPath ( this . resourcePath || path ) . setCrossOrigin ( this . crossOrigin ) ;
38053812
38063813 var tgaLoader ;
38073814
38083815 if ( THREE . TGALoader ) {
38093816
38103817 tgaLoader = new THREE . TGALoader ( this . manager ) ;
3811- tgaLoader . setPath ( path ) ;
3818+ tgaLoader . setPath ( this . resourcePath || path ) ;
38123819
38133820 }
38143821
You can’t perform that action at this time.
0 commit comments