-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
71 lines (60 loc) · 1.55 KB
/
app.vue
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script setup>
import { onMounted, onBeforeUnmount, ref } from 'vue'
const vantaBg = ref(null)
let vantaEffect = null
onMounted(() => {
// Dynamically load three.js and Vanta Waves script
loadVanta()
})
const loadVanta = () => {
const threeScript = document.createElement('script')
threeScript.src = 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js'
threeScript.onload = () => {
const vantaScript = document.createElement('script')
vantaScript.src = 'https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.birds.min.js'
vantaScript.onload = initVanta
document.head.appendChild(vantaScript)
}
document.head.appendChild(threeScript)
}
const initVanta = () => {
vantaEffect = VANTA.BIRDS({
el: vantaBg.value,
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
backgroundColor: 0x0B0B0B,
color1: 0x07EA9A,
color2: 0x07EA9A,
birdSize: 1.30,
quantity: 2.00
})
}
onBeforeUnmount(() => {
if (vantaEffect) vantaEffect.destroy()
})
</script>
<template>
<div class="xl:container border-0 border-blue-500 mx-auto z-20">
<div id="vanta-bg" ref="vantaBg">
<AppNavbar />
<AppHeader />
<CompanyLogos />
</div>
<ExperienceHighlights />
<ConnectWithMe />
<Copyrights />
<ScrollToTopButton />
</div>
</template>
<style>
body {
background-color: #0B0B0B;
color: white;
position: relative;
}
</style>