未验证 提交 c52fef3b 编写于 作者: W wemamawe 提交者: GitHub

parse opacity of material

some model is transparent, so it should parse MAT_TRANSPARENCY, and convert MAT_TRANSPARENCY to material.oapcity
上级 345e5042
......@@ -272,6 +272,12 @@ THREE.TDSLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
material.shininess = shininess;
this.debugMessage( ' Shininess : ' + shininess );
} else if ( next === MAT_TRANSPARENCY ) {
var opacity = this.readWord( data );
material.opacity = opacity*0.01;
this.debugMessage( ' Opacity : ' + opacity );
material.transparent = opacity<100 ? true : false;
} else if ( next === MAT_TEXMAP ) {
this.debugMessage( ' ColorMap' );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册