SpotLight.js 869 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.SpotLight = function ( hex, intensity, distance ) {
  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 = false;
  11. this.onlyShadow = false;
  12. //
  13. this.shadowCameraNear = 50;
  14. this.shadowCameraFar = 5000;
  15. this.shadowCameraFov = 50;
  16. this.shadowCameraVisible = false;
  17. this.shadowBias = 0;
  18. this.shadowDarkness = 0.5;
  19. this.shadowMapWidth = 512;
  20. this.shadowMapHeight = 512;
  21. //
  22. this.shadowMap = null;
  23. this.shadowMapSize = null;
  24. this.shadowCamera = null;
  25. this.shadowMatrix = null;
  26. };
  27. THREE.SpotLight.prototype = new THREE.Light();
  28. THREE.SpotLight.prototype.constructor = THREE.SpotLight;
粤ICP备19079148号