19 lines
785 B
TypeScript
19 lines
785 B
TypeScript
/**
|
|
* Centralised GSAP setup. Registers the (now-free) premium plugins ONCE,
|
|
* client-side only. Import { gsap, ScrollTrigger, ... } from here so every
|
|
* component shares the same registration and we never double-register.
|
|
*
|
|
* GSAP 3.15 ships DrawSVG / MorphSVG / SplitText / ScrollTrigger in the
|
|
* package (April 2025: all club plugins went free).
|
|
*/
|
|
import { gsap } from "gsap";
|
|
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
import { DrawSVGPlugin } from "gsap/DrawSVGPlugin";
|
|
import { MorphSVGPlugin } from "gsap/MorphSVGPlugin";
|
|
import { SplitText } from "gsap/SplitText";
|
|
|
|
if (typeof window !== "undefined") {
|
|
gsap.registerPlugin(ScrollTrigger, DrawSVGPlugin, MorphSVGPlugin, SplitText);
|
|
}
|
|
|
|
export { gsap, ScrollTrigger, DrawSVGPlugin, MorphSVGPlugin, SplitText };
|