feat(nds): add whoosh effect for nds 3d animation and for the gallery transition
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user