Animate an element over an elliptical arc.
xAniEllipse(xa, xr, yr, a1, a2, tt[, at[, qc[, oed[, oea[, oef]]]]]);
xAniEllipse returns xa.
Click a button to cause the corresponding method to be called for each xAnimation object.
pauseresumekill
This code starts the animations in this DIV, and updates them on window resize.
xAniEllipse(xa[0], cw/2, ch, 180, 0, tt, 1, 1, 0, null, 'true'); xAniEllipse(xa[1], cw/2, ch, 180, 360, tt, 1, 1, 0, null, 'true'); onEndTest(xa[2], OEA[0]);
This code starts the animations in this DIV, and updates them on window resize.
xAniEllipse(xa[3], cw/2, ch, 180, 0, tt, 2, 2, 0, null, 'true'); xAniEllipse(xa[4], cw/2, ch, 180, 360, tt, 2, 2, 0, null, 'true'); OEA[1].at = 2; onEndTest(xa[5], OEA[1]);
This code starts the animations in this DIV, and updates them on window resize.
xAniEllipse(xa[6], cw/2, ch, 180, 0, tt, 3, 2, 0, null, 'true'); xAniEllipse(xa[7], cw/2, ch, 180, 360, tt, 3, 2, 0, null, 'true'); OEA[2].at = 3; onEndTest(xa[8], OEA[2]);
Each of the above demos call onEndTest() which causes an element to travel around the border of the DIV.
function onEndTest(xa, xd) { var r = 3 * 180; xAniEllipse(xa, xd.cw/2, 20, 180, 180+r, xd.tt, xd.at, xd.qc, 0, xd, /* from sw to se */ function(a,d) { xAniEllipse(a, 20, xd.ch/2, 90, 90+r, xd.tt, xd.at, xd.qc, 0, xd, /* from se to ne */ function(a,d) { xAniEllipse(a, xd.cw/2, 20, 0, r, xd.tt, xd.at, xd.qc, 0, xd, /* from ne to nw */ function(a,d) { xAniEllipse(a, 20, xd.ch/2, 270, 270+r, xd.tt, xd.at, xd.qc, 0, xd, /* from nw to sw */ function(a,d) { onEndTest(a,d); } ); } ); } ); } ); }