Pārlūkot izejas kodu

Fixed NormalToComponent function (it was over saturated).

Mr.doob 14 gadi atpakaļ
vecāks
revīzija
7b58b806d3

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/Three.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/ThreeDebug.js


+ 1 - 1
src/renderers/CanvasRenderer.js

@@ -844,7 +844,7 @@ THREE.CanvasRenderer = function () {
 
 		// https://gist.github.com/665829
 
-		return normal < 0 ? Math.min( 1 + normal, 0.5 ) : 0.5 + Math.min( normal, 0.5 );
+		return normal < 0 ? Math.min( ( 1 + normal ) * 0.5, 0.5 ) : 0.5 + Math.min( normal * 0.5, 0.5 );
 
 	}
 

+ 1 - 1
src/renderers/SVGRenderer.js

@@ -476,7 +476,7 @@ THREE.SVGRenderer = function () {
 
 		// https://gist.github.com/665829
 
-		return normal < 0 ? Math.min( 1 + normal, 0.5 ) : 0.5 + Math.min( normal, 0.5 );
+		return normal < 0 ? Math.min( ( 1 + normal ) * 0.5, 0.5 ) : 0.5 + Math.min( normal * 0.5, 0.5 );
 
 	}
 

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels