Skip to content

Instantly share code, notes, and snippets.

@shuiRong
Created March 8, 2021 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuiRong/11566d7e2ef64bdfcc36a7fc699603f9 to your computer and use it in GitHub Desktop.
Save shuiRong/11566d7e2ef64bdfcc36a7fc699603f9 to your computer and use it in GitHub Desktop.
GSAP(GreenSock) 使用自定义 贝塞尔曲线 cubic-bezier 函数
用到这个库: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