# Code coverage report for src/light/Ambient.js

# all files / src/light/ Ambient.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4

    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

    1×

    3×
    3×
    3×

     import Light from '../Light';

    /**
     * @constructor clay.light.Ambient
     * @extends clay.Light
     */
    var AmbientLight = Light.extend({

        castShadow: false

    }, {

        type: 'AMBIENT_LIGHT',

        uniformTemplates: {
            ambientLightColor: {
                type: '3f',
                value: function(instance) {
                    var color = instance.color;
                    var intensity = instance.intensity;
                    return [color[0]*intensity, color[1]*intensity, color[2]*intensity];
                }
            }
        }
        /**
         * @function
         * @name clone
         * @return {clay.light.Ambient}
         * @memberOf clay.light.Ambient.prototype
         */
    });

    export default AmbientLight;