Skip to content

Commit

Permalink
Removed .isBlack() method (#22385)
Browse files Browse the repository at this point in the history
  • Loading branch information
WestLangley authored Aug 21, 2021
1 parent 588bc49 commit 4b26288
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions docs/api/en/math/Color.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ <h3>[method:Object getHSL]( [param:Object target] )</h3>
<h3>[method:String getStyle]()</h3>
<p>Returns the value of this color as a CSS style string. Example: 'rgb(255,0,0)'.</p>

<h3>[method:Boolean isBlack]() </h3>
<p>Returns true if the [page:.r r], [page:.g g] and [page:.b b] components are zero, false otherwise.</p>

<h3>[method:Color lerp]( [param:Color color], [param:Float alpha] ) </h3>
<p>
[page:Color color] - color to converge on.<br />
Expand Down
6 changes: 0 additions & 6 deletions src/math/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,6 @@ class Color {

}

isBlack() {

return ( this.r === 0 ) && ( this.g === 0 ) && ( this.b === 0 );

}

fromArray( array, offset = 0 ) {

this.r = array[ offset ];
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLPrograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities

gradientMap: !! material.gradientMap,

sheenTint: ( !! material.sheenTint && ! material.sheenTint.isBlack() ),
sheenTint: ( !! material.sheenTint && ( material.sheenTint.r > 0 || material.sheenTint.g > 0 || material.sheenTint.b > 0 ) ),

transmission: material.transmission > 0,
transmissionMap: !! material.transmissionMap,
Expand Down

0 comments on commit 4b26288

Please sign in to comment.