checkpoint: before i18n implementation

This commit is contained in:
Leon-in
2026-04-29 00:29:14 +08:00
parent ded6c67a36
commit 437dc976fb
41 changed files with 2167 additions and 1855 deletions
+3 -6
View File
@@ -13,7 +13,7 @@ export default function GsapAnimations() {
ctx = gsap.context(() => {
initMarquee(gsap, Observer)
initCounters(gsap, ScrollTrigger)
initCounters(gsap)
initScrollReveal(gsap, ScrollTrigger)
initButtonHovers(gsap)
initSmoothScroll()
@@ -93,7 +93,7 @@ function initMarquee(
target: window,
type: "wheel,scroll,touch",
onChangeY: (self: { velocityY: number }) => {
let velocity = gsap.utils.clamp(-40, 40, self.velocityY * 0.002)
const velocity = gsap.utils.clamp(-40, 40, self.velocityY * 0.002)
const dir = velocity < 0 ? -1 : 1
instances.forEach((inst) => {
if (inst.isHoverPaused) return
@@ -115,10 +115,7 @@ function initMarquee(
}
}
function initCounters(
gsap: typeof import("gsap").gsap,
ScrollTrigger: typeof import("gsap/ScrollTrigger").ScrollTrigger,
) {
function initCounters(gsap: typeof import("gsap").gsap) {
const elements = gsap.utils.toArray<HTMLElement>(".count-up-number-animation")
if (!elements.length) return