Packageorg.flintparticles.common.energyEasing
Classpublic class TwoWay

A set of easing equations for modifying the particle energy such that it starts and ends at zero and peaks at one half way through the particle's lifetime.

See also

org.flintparticles.common.actions.Age


Public Methods
 MethodDefined by
  
circular(age:Number, lifetime:Number):Number
[static] Energy increases and then decreases as if following the top half of a circle.
TwoWay
  
cubic(age:Number, lifetime:Number):Number
[static] Eases towards the middle using a cubic curve.
TwoWay
  
linear(age:Number, lifetime:Number):Number
[static] Gives a linear increase and decrease in energy either side of the centre point.
TwoWay
  
quadratic(age:Number, lifetime:Number):Number
[static] Eases towards the middle using a quadratic curve.
TwoWay
  
quartic(age:Number, lifetime:Number):Number
[static] Eases towards the middle using a quartic curve.
TwoWay
  
quintic(age:Number, lifetime:Number):Number
[static] Eases towards the middle using a quintic curve.
TwoWay
  
sine(age:Number, lifetime:Number):Number
[static] Energy follows the first half of a sine wave.
TwoWay
Method detail
circular()method
public static function circular(age:Number, lifetime:Number):Number

Energy increases and then decreases as if following the top half of a circle.

Parameters
age:Number
 
lifetime:Number

Returns
Number
cubic()method 
public static function cubic(age:Number, lifetime:Number):Number

Eases towards the middle using a cubic curve.

Parameters
age:Number
 
lifetime:Number

Returns
Number
linear()method 
public static function linear(age:Number, lifetime:Number):Number

Gives a linear increase and decrease in energy either side of the centre point.

Parameters
age:Number
 
lifetime:Number

Returns
Number
quadratic()method 
public static function quadratic(age:Number, lifetime:Number):Number

Eases towards the middle using a quadratic curve.

Parameters
age:Number
 
lifetime:Number

Returns
Number
quartic()method 
public static function quartic(age:Number, lifetime:Number):Number

Eases towards the middle using a quartic curve.

Parameters
age:Number
 
lifetime:Number

Returns
Number
quintic()method 
public static function quintic(age:Number, lifetime:Number):Number

Eases towards the middle using a quintic curve.

Parameters
age:Number
 
lifetime:Number

Returns
Number
sine()method 
public static function sine(age:Number, lifetime:Number):Number

Energy follows the first half of a sine wave.

Parameters
age:Number
 
lifetime:Number

Returns
Number