Kaynağa Gözat

Removed .isBlack() method (#22385)

WestLangley 3 yıl önce
ebeveyn
işleme
4b26288aa0

+ 0 - 3
docs/api/en/math/Color.html

@@ -208,9 +208,6 @@ const color7 = new THREE.Color( 1, 0, 0 );
 		<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 />

+ 0 - 6
src/math/Color.js

@@ -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 ];

+ 1 - 1
src/renderers/webgl/WebGLPrograms.js

@@ -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,