提交 76404319 编写于 作者: W Wittmann Tobias

userData To Material.js

上级 3997aa47
......@@ -62,6 +62,8 @@ function Material() {
this.visible = true;
this.needsUpdate = true;
this.userData = {};
}
......@@ -153,6 +155,7 @@ Object.assign( Material.prototype, EventDispatcher.prototype, {
data.type = this.type;
if ( this.name !== '' ) data.name = this.name;
if ( JSON.stringify( this.userData ) !== '{}' ) data.userData = this.userData;
if ( this.color && this.color.isColor ) data.color = this.color.getHex();
......@@ -331,6 +334,7 @@ Object.assign( Material.prototype, EventDispatcher.prototype, {
}
this.clippingPlanes = dstPlanes;
this.userData = JSON.parse( JSON.stringify( source.userData ) );
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册