Java Reference
In-Depth Information
Figure 4-4. Point light
The light in Figure 4-4 is located above the rectangle, as if a light was very close to it, creating a
circular gradient effect. As the animation progresses, the light on the rectangle will change in accordance
with the X, Y, and Z location of the light. Listing 4-3 shows how this animation was produced.
Listing 4-3. Main.fx (pointLight)
function pointLight():Void{
reset();
var rectSize = 300;
var x = 30.0;
var y = 60.0;
var z = 10.0;
Search WWH ::




Custom Search