浏览代码

Copy Material `dithering` property in `copy` and `toJSON` #11076

Brian Chirls 8 年之前
父节点
当前提交
1dd8c69564
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/materials/Material.js

+ 4 - 0
src/materials/Material.js

@@ -220,6 +220,8 @@ Object.assign( Material.prototype, EventDispatcher.prototype, {
 		data.skinning = this.skinning;
 		data.skinning = this.skinning;
 		data.morphTargets = this.morphTargets;
 		data.morphTargets = this.morphTargets;
 
 
+		data.dithering = this.dithering;
+
 		// TODO: Copied from Object3D.toJSON
 		// TODO: Copied from Object3D.toJSON
 
 
 		function extractFromCache( cache ) {
 		function extractFromCache( cache ) {
@@ -292,6 +294,8 @@ Object.assign( Material.prototype, EventDispatcher.prototype, {
 		this.polygonOffsetFactor = source.polygonOffsetFactor;
 		this.polygonOffsetFactor = source.polygonOffsetFactor;
 		this.polygonOffsetUnits = source.polygonOffsetUnits;
 		this.polygonOffsetUnits = source.polygonOffsetUnits;
 
 
+		this.dithering = source.dithering;
+
 		this.alphaTest = source.alphaTest;
 		this.alphaTest = source.alphaTest;
 
 
 		this.premultipliedAlpha = source.premultipliedAlpha;
 		this.premultipliedAlpha = source.premultipliedAlpha;