SpotLight.js 549 B

1234567891011121314151617181920
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.SpotLight = function ( hex, intensity, distance, castShadow ) {
  5. THREE.Light.call( this, hex );
  6. this.position = new THREE.Vector3( 0, 1, 0 );
  7. this.target = new THREE.Object3D();
  8. this.intensity = ( intensity !== undefined ) ? intensity : 1;
  9. this.distance = ( distance !== undefined ) ? distance : 0;
  10. this.castShadow = ( castShadow !== undefined ) ? castShadow : false;
  11. };
  12. THREE.SpotLight.prototype = new THREE.Light();
  13. THREE.SpotLight.prototype.constructor = THREE.SpotLight;
粤ICP备19079148号