October 2018
Intermediate to advanced
500 pages
12h 40m
English
We will create four lights by using the Light class from our framework with the following configurations:

First, we instantiate a LightsManager instance to manage our lights:
lights = new LightsManager();
Then, we create four light positions for each light and iterate over each position to uniquely position each light:
lightPositions = { farLeft: [-1000, 1000, -1000], farRight: [1000, 1000, -1000], nearLeft: [-1000, 1000, 1000], nearRight: [1000, 1000, 1000]};Object.keys(lightPositions).forEach(key => { const light = new Light(key); light.setPosition(lightPositions[key]); light.setDiffuse([0.4, 0.4, 0.4]); light.setSpecular ...