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

*TextureLoader: Added/Use setPath().

上级 b858a99c
......@@ -29,13 +29,14 @@ THREE.CompressedTextureLoader.prototype = {
var loader = new THREE.XHRLoader( this.manager );
loader.setCrossOrigin( this.crossOrigin );
loader.setPath( this.path );
loader.setResponseType( 'arraybuffer' );
if ( Array.isArray( url ) ) {
var loaded = 0;
var loadTexture = function ( i ) {
function loadTexture( i ) {
loader.load( url[ i ], function ( buffer ) {
......@@ -130,6 +131,12 @@ THREE.CompressedTextureLoader.prototype = {
this.crossOrigin = value;
},
setPath: function ( value ) {
this.path = value;
}
};
......@@ -18,6 +18,7 @@ THREE.CubeTextureLoader.prototype = {
var loader = new THREE.ImageLoader();
loader.setCrossOrigin( this.crossOrigin );
loader.setPath( this.path );
var loaded = 0;
......@@ -55,6 +56,12 @@ THREE.CubeTextureLoader.prototype = {
this.crossOrigin = value;
},
setPath: function ( value ) {
this.path = value;
}
};
......@@ -18,6 +18,7 @@ THREE.TextureLoader.prototype = {
var loader = new THREE.ImageLoader( this.manager );
loader.setCrossOrigin( this.crossOrigin );
loader.setPath( this.path );
loader.load( url, function ( image ) {
texture.image = image;
......@@ -39,6 +40,12 @@ THREE.TextureLoader.prototype = {
this.crossOrigin = value;
},
setPath: function ( value ) {
this.path = value;
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册