File size: 1,163 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
import { Object3D } from './../core/Object3D';
import { DirectionalLightShadow } from './DirectionalLightShadow';
import { Light } from './Light';
import { Vector3 } from '../math/Vector3';
import { ColorRepresentation } from '../utils';

/**
 * see {@link https://github.com/mrdoob/three.js/blob/master/src/lights/DirectionalLight.js|src/lights/DirectionalLight.js}
 *
 * @example
 * // White directional light at half intensity shining from the top.
 * const directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
 * directionalLight.position.set( 0, 1, 0 );
 * scene.add( directionalLight );
 */
export class DirectionalLight extends Light {
	constructor(color?: ColorRepresentation, intensity?: number);

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

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

	/**
	 * Target used for shadow camera orientation.
	 * @default new THREE.Object3D()
	 */
	target: Object3D;

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

	/**
	 * @default new THREE.DirectionalLightShadow()
	 */
	shadow: DirectionalLightShadow;
	readonly isDirectionalLight: true;
}