YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

animation  2.7.0

Yahoo! UI Library > animation > YAHOO.util.Bezier
Search:
 
Filters

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 © 2009 Yahoo! Inc. All rights reserved.