AreaLight.js 552 B

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