W3cubDocs

/Dojo

dojo/fx/easing

Summary

Collection of easing functions to use beyond the default dojo._defaultEasing function.

Easing functions are used to manipulate the iteration through an dojo.Animations _Line. _Line being the properties of an Animation, and the easing function progresses through that Line determining how quickly (or slowly) it should go. Or more accurately: modify the value of the _Line based on the percentage of animation completed.

All functions follow a simple naming convention of "ease type" + "when". If the name of the function ends in Out, the easing described appears towards the end of the animation. "In" means during the beginning, and InOut means both ranges of the Animation will applied, both beginning and end.

One does not call the easing function directly, it must be passed to the easing property of an animation.

See the dojo/fx/easing reference documentation for more information.

Examples

Example 1

dojo.require("dojo.fx.easing");
var anim = dojo.fadeOut({
    node: 'node',
    duration: 2000,
    //  note there is no ()
    easing: dojo.fx.easing.quadIn
}).play();

Methods

backIn(n)

Defined by dojo/fx/easing

An easing function that starts away from the target, and quickly accelerates towards the end value.

Use caution when the easing will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: number

backInOut(n)

Defined by dojo/fx/easing

An easing function combining the effects of backIn and backOut

An easing function combining the effects of backIn and backOut. Use caution when the easing will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: number

backOut(n)

Defined by dojo/fx/easing

An easing function that pops past the range briefly, and slowly comes back.

An easing function that pops past the range briefly, and slowly comes back.

Use caution when the easing will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: number

bounceIn(n)

Defined by dojo/fx/easing

An easing function that 'bounces' near the beginning of an Animation

Parameter Type Description
n Decimal
Optional

Returns: number

bounceInOut(n)

Defined by dojo/fx/easing

An easing function that 'bounces' at the beginning and end of the Animation

Parameter Type Description
n Decimal
Optional

Returns: number

bounceOut(n)

Defined by dojo/fx/easing

An easing function that 'bounces' near the end of an Animation

Parameter Type Description
n Decimal
Optional

Returns: number

circIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

circInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

circOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

cubicIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

cubicInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

cubicOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

elasticIn(n)

Defined by dojo/fx/easing

An easing function the elastically snaps from the start value

An easing function the elastically snaps from the start value

Use caution when the elasticity will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: Decimal | number

elasticInOut(n)

Defined by dojo/fx/easing

An easing function that elasticly snaps around the value, near the beginning and end of the Animation.

An easing function that elasticly snaps around the value, near the beginning and end of the Animation.

Use caution when the elasticity will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: number

elasticOut(n)

Defined by dojo/fx/easing

An easing function that elasticly snaps around the target value, near the end of the Animation

An easing function that elasticly snaps around the target value, near the end of the Animation

Use caution when the elasticity will cause values to become negative as some properties cannot be set to negative values.

Parameter Type Description
n Decimal
Optional

Returns: Decimal | number

expoIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

expoInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

expoOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

linear(n)

Defined by dojo/fx/easing

A linear easing function

Parameter Type Description
n Decimal
Optional

Returns: Decimal

quadIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

quadInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

quadOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

quartIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

quartInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

quartOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

quintIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

quintInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

quintOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

sineIn(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

sineInOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: number

sineOut(n)

Defined by dojo/fx/easing

Parameter Type Description
n Decimal
Optional

Returns: undefined

© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/fx/easing.html