From 16eaae53b325a5ad583103403262ab631b6f9189 Mon Sep 17 00:00:00 2001 From: ycw Date: Mon, 18 Sep 2023 16:27:01 +0800 Subject: [PATCH] cleanup (#26791) --- src/materials/Material.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/materials/Material.js b/src/materials/Material.js index 91496a0d38e042..9aaf1ab9ecc5f4 100644 --- a/src/materials/Material.js +++ b/src/materials/Material.js @@ -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; @@ -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;