1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| import gsap from "gsap"; gsap.to(cubeGroup.rotation, { x: "+=" + Math.PI * 2, y: "+=" + Math.PI * 2, duration: 10, ease: "power2.inOut", repeat: -1, }); gsap.to(sjxGroup.rotation, { x: "-=" + Math.PI * 2, z: "+=" + Math.PI * 2, duration: 12, ease: "power2.inOut", repeat: -1, }); gsap.to(smallBall.position, { x: -3, duration: 6, ease: "power2.inOut", repeat: -1, yoyo: true, }); gsap.to(smallBall.position, { y: 0, duration: 0.5, ease: "power2.inOut", repeat: -1, yoyo: true, });
|