Skip to content

Commit

Permalink
cleanup (mrdoob#26791)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw authored Sep 18, 2023
1 parent 633d804 commit 16eaae5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/materials/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ class Material extends EventDispatcher {

if ( this.blending !== NormalBlending ) data.blending = this.blending;
if ( this.side !== FrontSide ) data.side = this.side;
if ( this.vertexColors ) data.vertexColors = true;
if ( this.vertexColors === true ) data.vertexColors = true;

if ( this.opacity < 1 ) data.opacity = this.opacity;
if ( this.transparent === true ) data.transparent = this.transparent;
if ( this.transparent === true ) data.transparent = true;

data.depthFunc = this.depthFunc;
data.depthTest = this.depthTest;
Expand Down Expand Up @@ -354,17 +354,17 @@ class Material extends EventDispatcher {
if ( this.dithering === true ) data.dithering = true;

if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;
if ( this.alphaHash === true ) data.alphaHash = this.alphaHash;
if ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage;
if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;
if ( this.forceSinglePass === true ) data.forceSinglePass = this.forceSinglePass;
if ( this.alphaHash === true ) data.alphaHash = true;
if ( this.alphaToCoverage === true ) data.alphaToCoverage = true;
if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = true;
if ( this.forceSinglePass === true ) data.forceSinglePass = true;

if ( this.wireframe === true ) data.wireframe = this.wireframe;
if ( this.wireframe === true ) data.wireframe = true;
if ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;
if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;
if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;

if ( this.flatShading === true ) data.flatShading = this.flatShading;
if ( this.flatShading === true ) data.flatShading = true;

if ( this.visible === false ) data.visible = false;

Expand Down

0 comments on commit 16eaae5

Please sign in to comment.