Let's cover an example of positional lights in action:
- Open the ch03_07_positional_lighting.html file in your browser. The page will look similar to the following screenshot:
![](https://static.packt-cdn.com/products/9781788629690/graphics/assets/c52b4a9d-4cd9-4133-9ff9-2a84444d671f.png)
- The interface of this exercise is very simple. You can use the controls widget to interact with the scene. Unlike in previous exercises, the Translate X, Y, and Z sliders do not represent light direction here. Instead, they allow us to set the light source position. Go ahead and play with them.
- For clarity, a little sphere representing the position of the light source has been added to the scene to visualize the light source, but this is not generally required.
- What happens when the light source is located on the surface of the cone versus on the surface of the sphere?
- What happens when the light source is inside the sphere?
- Let's take a look at...