- From: Emad Eid <eeid@comcast.net>
- Date: Fri, 12 Dec 2014 09:46:42 -0500
- To: <public-fx@w3.org>
- Message-ID: <000001d0161a$72461260$56d23720$@comcast.net>
Comment on what Jeremie Patonnier said:
Not yet :-/ ISSUE 7 on the spec propose to improve the cubic-bezier easing
function definition to allow an arbitrary number of point, which allows to
create any useful easing function (I'm all for this extension). Such
extended cubic-bezier function will allow to handle any type of functions,
including elastic and bounce.
Why the easing definition has to be a String. Why not be able to provide js
function for easing
Something like.
var easing = function bounce (k) {
if ( ( k /= 1 ) < ( 1 / 2.75 ) ) {
return 7.5625 * k * k;
} else if ( k < ( 2 / 2.75 ) ) {
return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;
} else if ( k < ( 2.5 / 2.75 ) ) {
return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;
} else {
return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;
}
};
Thank you
Emad
Received on Monday, 15 December 2014 08:57:08 UTC