File size: 1,296 Bytes
2b7aae2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import { Color } from './../math/Color';
import { Vector3 } from '../math/Vector3';
import { Object3D } from './../core/Object3D';
import { SpotLightShadow } from './SpotLightShadow';
import { Light } from './Light';
import { ColorRepresentation } from '../utils';

/**
 * A point light that can cast shadow in one direction.
 */
export class SpotLight extends Light {
	constructor(color?: ColorRepresentation, intensity?: number, distance?: number, angle?: number, penumbra?: number, decay?: number);

	/**
	 * @default 'SpotLight'
	 */
	type: string;

	/**
	 * @default THREE.Object3D.DefaultUp
	 */
	position: Vector3;

	/**
	 * Spotlight focus points at target.position.
	 * @default new THREE.Object3D()
	 */
	target: Object3D;

	/**
	 * Light's intensity.
	 * @default 1
	 */
	intensity: number;

	/**
	 * If non-zero, light will attenuate linearly from maximum intensity at light position down to zero at distance.
	 * @default 0
	 */
	distance: number;

	/**
	 * Maximum extent of the spotlight, in radians, from its direction.
	 * @default Math.PI / 3.
	 */
	angle: number;

	/**
	 * @default 1
	 */
	decay: number;

	/**
	 * @default new THREE.SpotLightShadow()
	 */
	shadow: SpotLightShadow;
	power: number;

	/**
	 * @default 0
	 */
	penumbra: number;

	readonly isSpotLight: true;
}