content:[rect1, rect2, rect3]
insert box into exampleGroup.content;
Each of the five buttons in Listing 4-1 clears the contents of exampleGroup and then inserts new
content. The method that produced the non-animated example from the previous section is also
included; it shows how the three rectangles with the different light effect are created. The details of the
animated examples follow.
Distant Light Example
This example explores how a distant light can be used to make otherwise 2D text appear 3D. In the
screenshots in Figures 4-2 and 4-3, you can see the same text illuminated from two different angles.
Figure 4-2. Distant light on the right