Print Friendly

# Class YAHOO.util.Bezier

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

Used to calculate Bezier splines for any number of control points.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| getPosition(`Array points`, `Number t`) : Array | Bezier
Get the current position of the animated element based on t. Each point is an array of "x" and "y" values (0 = x, 1 =...

## Public Events

This class has no public events.

## Method Details

### getPosition

`public function getPosition(`Array points`, `Number t`)`
Get the current position of the animated element based on t. Each point is an array of "x" and "y" values (0 = x, 1 = y) At least 2 points are required (start and end). First point is start. Last point is end. Additional control points are optional.
Parameters:

- `points` : Array
  An array containing Bezier points
- `t` : Number
  A number between 0 and 1 which is the basis for determining current position

Returns:

- `Array`
  An array containing int x and y member data

This method is defined by Bezier.

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