未验证 提交 30820412 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #16181 from Temdog007/feature/SerializeMatcap

Material/MaterialLoader: Added matcap support.
......@@ -172,6 +172,7 @@ Object.assign( MaterialLoader.prototype, {
// maps
if ( json.map !== undefined ) material.map = getTexture( json.map );
if ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap );
if ( json.alphaMap !== undefined ) {
......
......@@ -168,6 +168,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
if ( this.clearCoatRoughness !== undefined ) data.clearCoatRoughness = this.clearCoatRoughness;
if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;
if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;
if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;
if ( this.lightMap && this.lightMap.isTexture ) data.lightMap = this.lightMap.toJSON( meta ).uuid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册