I need help with the solution provided here.
Create easy function 40% off set
I need to modify it so that the returned left and rights are extrapolated to 1,1
after splitting. This is because if I don't extrapolate, I can't use the returned split cubic-bezier as a css transition.
So this is the test I did. Please help because real does not match mike way :( I think the issue is I need to extrapolate the result to 1,1. I can't simply double the values though I'm pretty sure.
- REAL
ease-in-out
iscubic-bezier(.42,0,.58,1)
and graphically is http://cubic-bezier.com/#.42,0,.58,1- first half is
ease-in
which iscubic-bezier(.42,0,1,1)
and graphically is http://cubic-bezier.com/#.42,0,1,1 - seoncd half is
ease-out
which iscubic-bezier(0,0,.58,1)
and grpahically is http://cubic-bezier.com/#0,0,.58,1
- The function posted above returns the following
ease-in-out
is same as this is starting point- first half, left, is given to be
cubic-bezier(0.21, 0, 0.355, 0.25)
and graphically is http://cubic-bezier.com/#.21,0,.35,.25- code returned:
left:[0, 0, 0.21, 0, 0.355, 0.25, 0.5, 0.5]
- code returned:
- second half, right, is given to be
cubic-bezier(0.645, 0.75, 0.79, 1)
and graphically is http://cubic-bezier.com/#.64,.75,.79,1- code returned
right:[0.5, 0.5, 0.645, 0.75, 0.79, 1, 1, 1]
- code returned
Code used for getting it the Mike way is this:
var result = split({
z: .5,
x: [0, 0.42, 0.58, 1],
y: [0, 0, 1, 1]
});
alert(result.toSource());