| Package | org.as3lib.kitchensync.easing |
| Class | public class Random |
Random produces random values between 0.0 and 1.0. Since there is no accelleration, there is only one ease() function.
The easing classes provide static methods for interpolating the change between two values over time.
Each class handles the interpolation, or easing, differently. Each class typically contains three methods
- easeIn(), easeOut() and easeInOut() - which vary the rate of change
of the values. Most of the easing functions produce values as a percentage - a number between 0.0 and 1.0
| Property | Defined by | ||
|---|---|---|---|
| snapping : Boolean = true [static]
If set to true, random will snap to 1.0 if duration has elapsed.
| Random | ||
| Method | Defined by | ||
|---|---|---|---|
|
ease(timeElapsed:Number, duration:Number, minimum:Number = 0.0, maximum:Number = 1.0):Number
[static]
Produces a random value between 0.0 and 1.0.
| Random | ||
| snapping | property |
public static var snapping:Boolean = trueIf set to true, random will snap to 1.0 if duration has elapsed.
| ease | () | method |
public static function ease(timeElapsed:Number, duration:Number, minimum:Number = 0.0, maximum:Number = 1.0):NumberProduces a random value between 0.0 and 1.0. If snapping is set to true, always returns 1.0 when duration has elapsed.
ParameterstimeElapsed:Number — The time since the tween began in milliseconds or frames.
|
|
duration:Number — The duration of the tween, in milliseconds or frames.
|
|
minimum:Number (default = 0.0) — The lowest value to generate
|
|
maximum:Number (default = 1.0) — The highest value to generate
|
Number — percentage complete - between 0.0 and 1.0
|