function prepareLighting() {
        gl.uniform3f(
            shaderProgram.ambientColorUniform,
            getInput('ambientR'),
            getInput('ambientG'),
            getInput('ambientB')
        );

        gl.uniform3f(
            shaderProgram.pointLightingLocationUniform,
            // same origin as the Sun, so that light appears to emanate from the Sun
            0, 0, 0
        );

        gl.uniform3f(
            shaderProgram.pointLightingSpecularColorUniform,
            getInput('pointRSpecular'),
            getInput('pointGSpecular'),
            getInput('pointBSpecular')
        );

        gl.uniform3f(
            shaderProgram.pointLightingDiffuseColorUniform,
            getInput('pointRDiffuse'),
            getInput('pointGDiffuse'),
            getInput('pointBDiffuse')
        );
    }
/**
     * Prepares the canvas for drawing lighting by grabbing the lighting parameters from the GUI.
     * @method prepareLighting
     */
Prepares the canvas for drawing lighting by grabbing the lighting parameters from the GUI.
@method prepareLighting
Prepares the canvas for drawing lighting by grabbing the lighting parameters from the GUI . @method prepareLighting
function prepareLighting() {
        gl.uniform3f(
            shaderProgram.ambientColorUniform,
            getInput('ambientR'),
            getInput('ambientG'),
            getInput('ambientB')
        );
        gl.uniform3f(
            shaderProgram.pointLightingLocationUniform,
            0, 0, 0
        );
        gl.uniform3f(
            shaderProgram.pointLightingSpecularColorUniform,
            getInput('pointRSpecular'),
            getInput('pointGSpecular'),
            getInput('pointBSpecular')
        );
        gl.uniform3f(
            shaderProgram.pointLightingDiffuseColorUniform,
            getInput('pointRDiffuse'),
            getInput('pointGDiffuse'),
            getInput('pointBDiffuse')
        );
    }
function prepareLighting ( ) { gl . uniform3f ( shaderProgram . ambientColorUniform , getInput ( 'ambientR' ) , getInput ( 'ambientG' ) , getInput ( 'ambientB' ) ) ; gl . uniform3f ( shaderProgram . pointLightingLocationUniform , 0 , 0 , 0 ) ; gl . uniform3f ( shaderProgram . pointLightingSpecularColorUniform , getInput ( 'pointRSpecular' ) , getInput ( 'pointGSpecular' ) , getInput ( 'pointBSpecular' ) ) ; gl . uniform3f ( shaderProgram . pointLightingDiffuseColorUniform , getInput ( 'pointRDiffuse' ) , getInput ( 'pointGDiffuse' ) , getInput ( 'pointBDiffuse' ) ) ; }
Prepares the canvas for drawing lighting by grabbing the lighting parameters from the GUI.
Prepares the canvas for drawing lighting by grabbing the lighting parameters from the GUI .
// same origin as the Sun, so that light appears to emanate from the Sun