diff --git a/app/components/NDS3D.vue b/app/components/NDS3D.vue index 7d3948d..85030d4 100644 --- a/app/components/NDS3D.vue +++ b/app/components/NDS3D.vue @@ -102,6 +102,8 @@ const animateIntro = () => { if (hasAnimated.value) return; hasAnimated.value = true; + assets.audio.whoosh.play(); + gsap .timeline() .to( @@ -538,11 +540,6 @@ const releaseButton = () => { }; const handleMouseDown = (event: MouseEvent) => { - if (!hasAnimated.value) { - animateIntro(); - return; - } - handleInteraction(event.clientX, event.clientY, (canvas, intersection) => { dispatchScreenEvent("mousedown", canvas, intersection); }); @@ -602,11 +599,6 @@ const handleTouchStart = (event: TouchEvent) => { swipeStartX = touch.clientX; swipeStartY = touch.clientY; - if (!hasAnimated.value) { - animateIntro(); - return; - } - handleInteraction(touch.clientX, touch.clientY, (canvas, intersection) => { dispatchScreenEvent("mousedown", canvas, intersection); }); diff --git a/app/stores/gallery.ts b/app/stores/gallery.ts index 0cbf64b..5fe0a1c 100644 --- a/app/stores/gallery.ts +++ b/app/stores/gallery.ts @@ -114,6 +114,11 @@ export const useGalleryStore = defineStore("gallery", { this.shouldAnimateOutro = true; navigateTo("/gallery"); }, ANIMATION.NAVIGATE_DELAY); + + setTimeout(() => { + const { assets } = useAssets(); + assets.audio.whooshSmall.play(0.6); + }, 500); }, animateOutro() { @@ -191,6 +196,9 @@ export const useGalleryStore = defineStore("gallery", { app.navigateTo("home"); app.allowHints(); }, ANIMATION.NAVIGATE_DELAY); + + const { assets } = useAssets(); + assets.audio.whooshSmallReverse.play(0.6); }, }, }); diff --git a/public/nds/audio/whoosh-small-reverse.mp3 b/public/nds/audio/whoosh-small-reverse.mp3 new file mode 100644 index 0000000..7e1a690 Binary files /dev/null and b/public/nds/audio/whoosh-small-reverse.mp3 differ diff --git a/public/nds/audio/whoosh-small.mp3 b/public/nds/audio/whoosh-small.mp3 new file mode 100644 index 0000000..dec8d95 Binary files /dev/null and b/public/nds/audio/whoosh-small.mp3 differ diff --git a/public/nds/audio/whoosh.mp3 b/public/nds/audio/whoosh.mp3 new file mode 100644 index 0000000..6a4d50b Binary files /dev/null and b/public/nds/audio/whoosh.mp3 differ