gsap.parseEase()
返回值:缓动函数
传入一个缓动字符串gsap.parseEase()
它将返回相应的解析后的缓动函数。例如:
//simple
let ease = gsap.parseEase("power1");
//or a configurable one:
let step = gsap.parseEase("steps(5)");
let elastic = gsap.parseEase("elastic(1.2, 0.5)");
如果加载/注册了 CustomEase,你甚至可以传入 Cubic Bezier 值,它会返回相应的自定义缓动函数,例如:
// if CustomEase is loaded, GSAP can parse cubic bezier values too:
let ease = gsap.parseEase(".17,.67,.83,.67");
对于更复杂的使用场景,请参阅混合缓动(blended eases)辅助函数。