1 | import { Light } from './Light.js';
|
2 | import { Color } from '../math/Color.js';
|
3 | import { Object3D } from '../core/Object3D.js';
|
4 |
|
5 | class 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 |
|
32 | HemisphereLight.prototype.isHemisphereLight = true;
|
33 |
|
34 | export { HemisphereLight };
|