赣州市洪水风险预警系统三维版本
guoshilong
2023-02-27 4d8c6dd77427e8e581fda17b6b65ba86bfb7a815
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
import Color from '../Core/Color.js';
import defaultValue from '../Core/defaultValue.js';
import defined from '../Core/defined.js';
 
    /**
     * A directional light source that originates from the Sun.
     *
     * @param {Object} [options] Object with the following properties:
     * @param {Color} [options.color=Color.WHITE] The light's color.
     * @param {Number} [options.intensity=2.0] The light's intensity.
     *
     * @alias SunLight
     * @constructor
     */
    function SunLight(options) {
        options = defaultValue(options, defaultValue.EMPTY_OBJECT);
        /**
         * The color of the light.
         * @type {Color}
         * @default Color.WHITE
         */
        this.color = defined(options.color) ? Color.clone(options.color) : Color.WHITE;
 
        /**
         * The intensity of the light.
         * @type {Number}
         * @default 2.0
         */
        this.intensity = defaultValue(options.intensity, 2.0);
    }
 
export default SunLight;