smooth-Scroll aus der three.js Komponente entfernen
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user