Pārlūkot izejas kodu

Merge pull request #14076 from bGute/patch-2

Update Material.toJSON
Mr.doob 7 gadi atpakaļ
vecāks
revīzija
b22db83fa5
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      src/materials/Material.js

+ 4 - 0
src/materials/Material.js

@@ -244,6 +244,10 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 		// rotation (SpriteMaterial)
 		// rotation (SpriteMaterial)
 		if ( this.rotation !== 0 ) data.rotation = this.rotation;
 		if ( this.rotation !== 0 ) data.rotation = this.rotation;
 
 
+		if ( this.polygonOffset === true ) data.polygonOffset = true;
+		if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;
+		if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;
+
 		if ( this.linewidth !== 1 ) data.linewidth = this.linewidth;
 		if ( this.linewidth !== 1 ) data.linewidth = this.linewidth;
 		if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
 		if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
 		if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;
 		if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;