1. gsap

https://greensock.com/docs/v3/GSAP

https://www.bilibili.com/read/cv16848512/

import gsap from 'gsap'

const gsapPromise = (property: any, obj: any, duration: number) => {
  return new Promise((resolve, reject) => {
    gsap.to(property, {
      ...obj,
      duration,
      repeat: 0,
      yoyo: true,
      onComplete: () => {
        resolve(1)
      }
    })
  })
}

export default gsapPromise
Copyright © tomgou 2022 all right reserved,powered by Gitbook该文章修订时间: 2022-11-24 10:27:28

results matching ""

    No results matching ""