Java Reference
In-Depth Information
Figure 2-3. Example 2, adding controls
Playing with the sliders can help illustrate the concepts discussed in the previous section, especially
visual density. By dragging the frequency slider all the way to the right, the rate at which particles are
added to the scene drops considerably. Notice how less of the screen displays particles. Conversely,
dragging the particle size slider to the right creates a very dense effect.
Listing 2-4. Emitter.fx (partial)
public var particleRadius = 5.0;
public var particleSpeed = 1.0;
public var particleDuration = 100;
public var frequency = .05s on replace {
emitTimeline.playFromStart();
}
///... Rest of class omitted for brevity
Search WWH ::




Custom Search