AreaLight.js 641 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @author MPanknin / http://www.redplant.de/
  3. * @author alteredq / http://alteredqualia.com/
  4. */
  5. THREE.AreaLight = function ( color, intensity ) {
  6. THREE.Light.call( this, color );
  7. this.type = 'AreaLight';
  8. this.normal = new THREE.Vector3( 0, - 1, 0 );
  9. this.right = new THREE.Vector3( 1, 0, 0 );
  10. this.intensity = ( intensity !== undefined ) ? intensity : 1;
  11. this.width = 1.0;
  12. this.height = 1.0;
  13. this.constantAttenuation = 1.5;
  14. this.linearAttenuation = 0.5;
  15. this.quadraticAttenuation = 0.1;
  16. };
  17. THREE.AreaLight.prototype = Object.create( THREE.Light.prototype );
  18. THREE.AreaLight.prototype.constructor = THREE.AreaLight;