Illuminate the Clone Children II!

Move the mouse over the image to direct the spotlight.

This pages uses the onmousemove event and the movelight() method to make the spotlight follow the mouse pointer as it moves over the image. Try moving the pointer nearer and farther from the top of the picture, and see how the intensity changes. This is because the target location for the light cone is at the mouse pointer. Between the light source and its target position, the light decays from 100% to whatever it's been set to be at the target (60% in this example). Thus the longer the distance between the source and the target, the longer the area of high-intensity light.


Back to Menu