-
-
Save shuiRong/11566d7e2ef64bdfcc36a7fc699603f9 to your computer and use it in GitHub Desktop.
GSAP(GreenSock) 使用自定义 贝塞尔曲线 cubic-bezier 函数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用到这个库:https://github.com/gre/bezier-easing | |
`bezier-easing` 和 CSS 的 `transition-timing-function` 函数效果完全一样 | |
``` | |
import BezierEasing from "bezier-easing"; | |
TweenLite.to(mc, 5, {x:600, ease:new Ease(BezierEasing(0.25, 0.1, 0.0, 1.0))}); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref: https://greensock.com/forums/topic/7921-translating-css-cubic-bezier-easing-to-gsap/?do=findComment&comment=38732