From 39db179b8266186afaaca1df65642debd877058f Mon Sep 17 00:00:00 2001 From: alteredq Date: Sat, 22 Dec 2012 04:26:22 +0100 Subject: [PATCH] WebGLDeferredRenderer: made attenuation parameters properties of AreaLight instead of hardcoded constants. --- build/three.js | 4 ++++ build/three.min.js | 2 +- examples/js/ShaderDeferred.js | 17 +++++++++++------ examples/js/renderers/WebGLDeferredRenderer.js | 4 ++++ src/lights/AreaLight.js | 4 ++++ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/build/three.js b/build/three.js index 685f5c4012..a41ddb91e7 100644 --- a/build/three.js +++ b/build/three.js @@ -7991,6 +7991,10 @@ THREE.AreaLight = function ( hex, intensity ) { this.width = 1.0; this.height = 1.0; + this.constantAttenuation = 1.5; + this.linearAttenuation = 0.5; + this.quadraticAttenuation = 0.1; + }; THREE.AreaLight.prototype = Object.create( THREE.Light.prototype ); diff --git a/build/three.min.js b/build/three.min.js index 746f708db3..92efee085c 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -163,7 +163,7 @@ this.attributes.uv)console.warn("Missing required attributes (index, position, n var n,p,m,r,s,l,q,u,B,x,t,F,C,z,A,f=new THREE.Vector3,g=new THREE.Vector3,H,G,I,$,D,L,y,K=this.offsets;I=0;for($=K.length;I<$;++I){G=K[I].start;D=K[I].count;var J=K[I].index;H=G;for(G+=D;H