Re: Syncing Core Animation and NSAnimation timing functions
Re: Syncing Core Animation and NSAnimation timing functions
- Subject: Re: Syncing Core Animation and NSAnimation timing functions
- From: Dimitri Bouniol <email@hidden>
- Date: Sun, 24 Feb 2008 17:09:27 -0800
It seems I can't use superscript and subscript in emails... fixed the
function so its powers are correct:
I have both a CALayer implicit property animation, and a NSAnimation
running at the same time. They both start and stop at the same time,
but i'm having trouble with the pace at which they are animating at.
Core Animation describes it's timing function to be a bezier path
with variable control points, but NSAnimation has either preset
timing functions, or custom ones (by delegation). I guess my
question would be how can I transform a cubic bezier function into a
suitable timing function.
In vector drawing, i know that you can calculate the points of a
bezier curve using the following (for t being equal to each value in
the interval [0; 1], and P0, P1, P2, P3 being the 4 control points
of the bezier curve):
B(t) = ((1 - t)^3)P0 + 3t((1 - t)^2)P1 + 3(t^2)(1 - t)P2 + (t^3)P3
For the timing function, I know that P0 is (0; 0) and P3 is (1; 1),
and that P1 and P2 are different based on weather it's ease-in, ease-
out... but what I'm not sure about is how I can use this in the
delegate of my NSAnimation class...
Many thanks in advance to anyone who can help.
--
定魅刀利
Dimitri Bouniol
email@hidden
http://web.mac.com/dimitri008/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden