提交 b858a99c 编写于 作者: M Mr.doob

ImageLoader/XHRLoader: Added .setPath()

上级 c4940af2
......@@ -14,6 +14,8 @@ THREE.ImageLoader.prototype = {
load: function ( url, onLoad, onProgress, onError ) {
if ( this.path !== undefined ) url = this.path + url;
var scope = this;
var cached = THREE.Cache.get( url );
......@@ -86,6 +88,12 @@ THREE.ImageLoader.prototype = {
this.crossOrigin = value;
},
setPath: function ( value ) {
this.path = value;
}
};
......@@ -14,6 +14,8 @@ THREE.XHRLoader.prototype = {
load: function ( url, onLoad, onProgress, onError ) {
if ( this.path !== undefined ) url = this.path + url;
var scope = this;
var cached = THREE.Cache.get( url );
......@@ -79,15 +81,21 @@ THREE.XHRLoader.prototype = {
},
setCrossOrigin: function ( value ) {
this.crossOrigin = value;
},
setResponseType: function ( value ) {
this.responseType = value;
},
setCrossOrigin: function ( value ) {
setPath: function ( value ) {
this.crossOrigin = value;
this.path = value;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册