SpotLight.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { Color } from './../math/Color';
  2. import { Object3D } from './../core/Object3D';
  3. import { SpotLightShadow } from './SpotLightShadow';
  4. import { Light } from './Light';
  5. /**
  6. * A point light that can cast shadow in one direction.
  7. */
  8. export class SpotLight extends Light {
  9. constructor(
  10. color?: Color | string | number,
  11. intensity?: number,
  12. distance?: number,
  13. angle?: number,
  14. exponent?: number,
  15. decay?: number
  16. );
  17. /**
  18. * Spotlight focus points at target.position.
  19. * Default position — (0,0,0).
  20. */
  21. target: Object3D;
  22. /**
  23. * Light's intensity.
  24. * Default — 1.0.
  25. */
  26. intensity: number;
  27. /**
  28. * If non-zero, light will attenuate linearly from maximum intensity at light position down to zero at distance.
  29. * Default — 0.0.
  30. */
  31. distance: number;
  32. /*
  33. * Maximum extent of the spotlight, in radians, from its direction.
  34. * Default — Math.PI/2.
  35. */
  36. angle: number;
  37. /**
  38. * Rapidity of the falloff of light from its target direction.
  39. * Default — 10.0.
  40. */
  41. exponent: number;
  42. decay: number;
  43. shadow: SpotLightShadow;
  44. power: number;
  45. penumbra: number;
  46. }