Browse Source

Applying alteredq's CanvasRenderer fix re Ambient Light calculation to SVGRenderer.

Mr.doob 14 years ago
parent
commit
f30216ff8e
3 changed files with 5 additions and 7 deletions
  1. 0 1
      build/Three.js
  2. 0 1
      build/ThreeDebug.js
  3. 5 5
      src/renderers/SVGRenderer.js

File diff suppressed because it is too large
+ 0 - 1
build/Three.js


File diff suppressed because it is too large
+ 0 - 1
build/ThreeDebug.js


+ 5 - 5
src/renderers/SVGRenderer.js

@@ -102,7 +102,7 @@ THREE.SVGRenderer = function () {
 
 
 			}/* else if ( element instanceof THREE.RenderableLine ) {
 			}/* else if ( element instanceof THREE.RenderableLine ) {
 
 
-				
+
 
 
 			}*/ else if ( element instanceof THREE.RenderableFace3 ) {
 			}*/ else if ( element instanceof THREE.RenderableFace3 ) {
 
 
@@ -200,7 +200,7 @@ THREE.SVGRenderer = function () {
 
 
 		var l, ll, light;
 		var l, ll, light;
 
 
-		color.setRGBA( 1, 1, 1, 1 );
+		color.setRGBA( 0, 0, 0, 1 );
 
 
 		for ( l = 0, ll = scene.lights.length; l < ll; l++ ) {
 		for ( l = 0, ll = scene.lights.length; l < ll; l++ ) {
 
 
@@ -208,9 +208,9 @@ THREE.SVGRenderer = function () {
 
 
 			if ( light instanceof THREE.AmbientLight ) {
 			if ( light instanceof THREE.AmbientLight ) {
 
 
-				color.r *= light.color.r;
-				color.g *= light.color.g;
-				color.b *= light.color.b;
+				color.r += light.color.r;
+				color.g += light.color.g;
+				color.b += light.color.b;
 
 
 			}
 			}
 
 

Some files were not shown because too many files changed in this diff