Print Friendly

# Class YAHOO.util.Easing

Package: | YAHOO.util
Class: | Easing
Extends: | Object
Defined In: | animation.js

Singleton that determines how an animation proceeds from start to end.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| backBoth(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`]) : Number | Easing
Backtracks slightly, then reverses direction, overshoots end, then reverses and comes back to end.
| backIn(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`]) : Number | Easing
Backtracks slightly, then reverses direction and moves to end.
| backOut(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`]) : Number | Easing
Overshoots end, then reverses and comes back to end.
| bounceBoth(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Bounces off start and end.
| bounceIn(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Bounce off of start.
| bounceOut(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Bounces off end.
| easeBoth(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins slowly and decelerates towards end. (quadratic)
| easeBothStrong(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins slowly and decelerates towards end. (quartic)
| easeIn(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins slowly and accelerates towards end. (quadratic)
| easeInStrong(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins slowly and accelerates towards end. (quartic)
| easeNone(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Uniform speed between points.
| easeOut(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins quickly and decelerates towards end. (quadratic)
| easeOutStrong(`Number t`, `Number b`, `Number c`, `Number d`) : Number | Easing
Begins quickly and decelerates towards end. (quartic)
| elasticBoth(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`]) : Number | Easing
Snap both elastic effect.
| elasticIn(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`]) : Number | Easing
Snap in elastic effect.
| elasticOut(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`]) : Number | Easing
Snap out elastic effect.

## Public Events

This class has no public events.

## Method Details

### backBoth

`public function backBoth(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`])`
Backtracks slightly, then reverses direction, overshoots end, then reverses and comes back to end.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `s` : Number
  Overshoot (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### backIn

`public function backIn(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`])`
Backtracks slightly, then reverses direction and moves to end.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `s` : Number
  Overshoot (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### backOut

`public function backOut(`Number t`, `Number b`, `Number c`, `Number d`, [`Number s`])`
Overshoots end, then reverses and comes back to end.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `s` : Number
  Overshoot (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### bounceBoth

`public function bounceBoth(`Number t`, `Number b`, `Number c`, `Number d`)`
Bounces off start and end.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### bounceIn

`public function bounceIn(`Number t`, `Number b`, `Number c`, `Number d`)`
Bounce off of start.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### bounceOut

`public function bounceOut(`Number t`, `Number b`, `Number c`, `Number d`)`
Bounces off end.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeBoth

`public function easeBoth(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins slowly and decelerates towards end. (quadratic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeBothStrong

`public function easeBothStrong(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins slowly and decelerates towards end. (quartic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeIn

`public function easeIn(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins slowly and accelerates towards end. (quadratic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeInStrong

`public function easeInStrong(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins slowly and accelerates towards end. (quartic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeNone

`public function easeNone(`Number t`, `Number b`, `Number c`, `Number d`)`
Uniform speed between points.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeOut

`public function easeOut(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins quickly and decelerates towards end. (quadratic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### easeOutStrong

`public function easeOutStrong(`Number t`, `Number b`, `Number c`, `Number d`)`
Begins quickly and decelerates towards end. (quartic)
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### elasticBoth

`public function elasticBoth(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`])`
Snap both elastic effect.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `p` : Number
  Period (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### elasticIn

`public function elasticIn(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`])`
Snap in elastic effect.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `p` : Number
  Period (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

### elasticOut

`public function elasticOut(`Number t`, `Number b`, `Number c`, `Number d`, [`Number p`])`
Snap out elastic effect.
Parameters:

- `t` : Number
  Time value used to compute current value
- `b` : Number
  Starting value
- `c` : Number
  Delta between start and end values
- `d` : Number
  Total length of animation
- `p` : Number
  Period (optional)

Returns:

- `Number`
  The computed value for the current animation frame

This method is defined by Easing.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.