Yahoo! UI Library

animation 

Yahoo! UI Library > animation > YAHOO.util.Bezier

Class YAHOO.util.Bezier

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

Methods

getPosition

Array getPosition ( points , 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


Copyright © 2006 Yahoo! Inc. All rights reserved.