UNPKG

622 BJavaScriptView Raw
1import { Light } from './Light.js';
2import { Color } from '../math/Color.js';
3import { Object3D } from '../core/Object3D.js';
4
5class HemisphereLight extends Light {
6
7 constructor( skyColor, groundColor, intensity ) {
8
9 super( skyColor, intensity );
10
11 this.type = 'HemisphereLight';
12
13 this.position.copy( Object3D.DefaultUp );
14 this.updateMatrix();
15
16 this.groundColor = new Color( groundColor );
17
18 }
19
20 copy( source ) {
21
22 Light.prototype.copy.call( this, source );
23
24 this.groundColor.copy( source.groundColor );
25
26 return this;
27
28 }
29
30}
31
32HemisphereLight.prototype.isHemisphereLight = true;
33
34export { HemisphereLight };