|
@@ -25,6 +25,7 @@ Object.assign( MaterialLoader.prototype, {
|
|
|
var scope = this;
|
|
|
|
|
|
var loader = new FileLoader( scope.manager );
|
|
|
+ loader.setPath( scope.path );
|
|
|
loader.load( url, function ( text ) {
|
|
|
|
|
|
onLoad( scope.parse( JSON.parse( text ) ) );
|
|
@@ -33,12 +34,6 @@ Object.assign( MaterialLoader.prototype, {
|
|
|
|
|
|
},
|
|
|
|
|
|
- setTextures: function ( value ) {
|
|
|
-
|
|
|
- this.textures = value;
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
parse: function ( json ) {
|
|
|
|
|
|
var textures = this.textures;
|
|
@@ -219,6 +214,20 @@ Object.assign( MaterialLoader.prototype, {
|
|
|
|
|
|
return material;
|
|
|
|
|
|
+ },
|
|
|
+
|
|
|
+ setPath: function ( value ) {
|
|
|
+
|
|
|
+ this.path = value;
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ setTextures: function ( value ) {
|
|
|
+
|
|
|
+ this.textures = value;
|
|
|
+ return this;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
} );
|