Constructors

Properties

Methods

Ease class

com.senocular.Ease

 

 

 

Overview

Usage

class com.senocular.Ease

Description

The Ease class is used to create functions that add an easing to a number value or percentage. Functions created take one numeric parameter t (0-1) and returns an eased version of that value.

Constructors

 

Ease

Usage

public function Ease(Void)

Description

Constructor: Creates an Ease instance.

Properties

 

method

Usage

public var method:Function

Description

Easing method.

Default

function(t:Number){ return t; }
 

type

Usage

public var type:Function

Description

Ease type (in or out)

Default

function(t:Number, e:Function):Number { return e(t); }

Methods

 

compound

Usage

public static function compound():Function

Description

Compounds multiple ease functions to be called in sequential order as one function

Parameters

functions
Any number of comma-separated functions or Ease instances to be combined into one function

Returns

A new easing function which will call each function passed in, evenly distributed, in sequential order.
 

create

Usage

public function create(f:Object):Function

Description

Creates a function reflective of the easing applied to the Ease instance. The function accepts one parameter, t:Number, and returns the eased version of its value when called. This function mimics the call() method of Ease.

Parameters

f
An additional function the returned function can wrap

Returns

A function which applies a tween to a number passed into it when called.
 

call

Usage

public function call(t:Number):Number

Description

Applies Easing as defined by the Ease instance to the value passed.

Parameters

t
A value 0-1 which is to have easing applied to it

Returns

The eased version of the number passed.
 

easingIn

Usage

public function easingIn(a:Number):Ease

Description

Modifies the Ease to ease in by a specified amount

Parameters

a
Amount of easing applied to the ease

Returns

The current Ease instance
 

easingOut

Usage

public function easingOut(a:Number):Ease

Description

Modifies the Ease to ease out by a specified amount

Parameters

a
Amount of easing applied to the ease

Returns

The current Ease instance