Java Reference
In-Depth Information
Figure 4-5. Spot light
The light shown in Figure 4-5 is located at the circular dot. The light is configured to point toward
the small square dot, and the cone shape of the light can be seen. The source code in Listing 4-4 creates
an animation that includes the frame in Figure 4-5.
Listing 4-4. Main.fx (spotLight)
function spotLight():Void{
var rectSize = 300;
var half = rectSize/2.0;
var x = 30.0;
var y = 60.0;
var z = 10.0;
Search WWH ::

Custom Search