提交 43c5354f 编写于 作者: M mese79

add support for normal/bump scale

上级 7978aefc
......@@ -5,6 +5,7 @@
THREE.ObjectLoader = function ( manager ) {
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
this.texturePath = '';
};
......@@ -14,7 +15,7 @@ THREE.ObjectLoader.prototype = {
load: function ( url, onLoad, onProgress, onError ) {
if ( this.texturePath === undefined ) {
if ( this.texturePath === '' ) {
this.texturePath = url.substring( 0, url.lastIndexOf( '/' ) + 1 );
......@@ -245,6 +246,9 @@ THREE.ObjectLoader.prototype = {
if ( data.bumpMap !== undefined ) {
material.bumpMap = getTexture( data.bumpMap );
if ( data.bumpScale ) {
material.bumpScale = new THREE.Vector2( data.bumpScale, data.bumpScale );
}
}
......@@ -263,6 +267,9 @@ THREE.ObjectLoader.prototype = {
if ( data.normalMap !== undefined ) {
material.normalMap = getTexture( data.normalMap );
if ( data.normalScale ) {
material.normalScale = new THREE.Vector2( data.normalScale, data.normalScale );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册