我需要有关此处提供的解决方案的帮助。
1,1
我需要对其进行修改,以便在拆分后推断返回的左右。这是因为如果我不推断,我不能使用返回的分割三次贝塞尔曲线作为 css 过渡。
所以这是我做的测试。请帮忙,因为 real 不匹配 mike way :( 我认为问题是我需要将结果推断为 1,1。虽然我很确定,但我不能简单地将值加倍。
- 真实的
ease-in-out
是cubic-bezier(.42,0,.58,1)
并且图形是http://cubic-bezier.com/#.42,0,.58,1- 前半部分
ease-in
是cubic-bezier(.42,0,1,1)
http://cubic-bezier.com/#.42,0,1,1 - seoncd 的一半是
ease-out
,cubic-bezier(0,0,.58,1)
并且在 grpahically 是http://cubic-bezier.com/#0,0,.58,1
- 上面发布的函数返回以下内容
ease-in-out
与此相同是起点- 上半部分,左边,是
cubic-bezier(0.21, 0, 0.355, 0.25)
并且图形是http://cubic-bezier.com/#.21,0,.35,.25- 返回的代码:
left:[0, 0, 0.21, 0, 0.355, 0.25, 0.5, 0.5]
- 返回的代码:
- 下半场,正确的,是
cubic-bezier(0.645, 0.75, 0.79, 1)
和图形是http://cubic-bezier.com/#.64,.75,.79,1- 返回的代码
right:[0.5, 0.5, 0.645, 0.75, 0.79, 1, 1, 1]
- 返回的代码
用于获取 Mike 方式的代码是这样的:
var result = split({
z: .5,
x: [0, 0.42, 0.58, 1],
y: [0, 0, 1, 1]
});
alert(result.toSource());