-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathapp.vue
More file actions
33 lines (30 loc) · 694 Bytes
/
app.vue
File metadata and controls
33 lines (30 loc) · 694 Bytes
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
31
32
33
<script setup>
const scrollState = inject('scrollState');
const lenisRef = ref(null);
const lenisOptions = ref({
duration: .35,
direction: 'Horizontal',
touchMultiplier: 20,
infinite: false
})
watch(scrollState, async (val) => {
// console.log('scrollState', val)
})
const scrollEmitter = (val) => {
// console.log('scrollEmitter', val)
}
onMounted(() => {
// console.log('ref', lenisRef.value)
})
</script>
<template>
<lenis id="test" ref="lenisRef" :options="lenisOptions" @scroll="scrollEmitter">
<div class="glowball "></div>
<SeoKit />
<div class="pt-5 bg-black">
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</lenis>
</template>