smooth-Scroll aus der three.js Komponente entfernen

This commit is contained in:
th
2026-03-09 10:58:25 +00:00
parent 71de712741
commit 3fdf89acde

View File

@@ -3,15 +3,38 @@ import HeroSection from '../components/sections/HeroSection.vue'
import ImageSection from '../components/sections/ImageSection.vue'
import TextSection from '../components/sections/TextSection.vue'
import { onMounted, nextTick } from "vue"
import gsap from "gsap"
import ScrollTrigger from "gsap/ScrollTrigger"
import ScrollSmoother from "gsap/ScrollSmoother"
gsap.registerPlugin(ScrollTrigger, ScrollSmoother)
onMounted(async () => {
await nextTick()
ScrollSmoother.create({
wrapper: "#smooth-wrapper",
content: "#smooth-content",
smooth: 0.2,
effects: true
})
ScrollTrigger.refresh()
})
</script>
<template>
<div id="smooth-wrapper">
<div id="smooth-content">
<HeroSection id="hero" />
<ImageSection id="image" />
<TextSection id="text" />
</div>
</div>
</template>