Adding Support for Light Objects

Let's cover these changes in detail. We have created a new JavaScript module, Lights.js, that has two objects:

LightsManager also contains the getArray method to flatten the arrays of properties by type:

getArray(type) {
return this.list.reduce((result, light) => {
result = result.concat(light[type]);
return result;
}, []);
}

This will be useful when we use uniform arrays later on.