feat(projects): don't repeat key input and click on mouse down

This commit is contained in:
2026-02-12 00:34:10 +01:00
parent 2137abf424
commit 29b2f79a9a

View File

@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import gsap from "gsap"; import gsap from "gsap";
const { onRender, onClick } = useScreen(); const { onRender, onMouseDown } = useScreen();
const store = useProjectsStore(); const store = useProjectsStore();
const { assets } = useAssets(); const { assets } = useAssets();
@@ -84,7 +84,7 @@ const startButtonAnimation = (type: ButtonType) => {
}); });
}; };
onClick((x, y) => { onMouseDown((x, y) => {
if ( if (
currentAnimation || currentAnimation ||
store.isIntro || store.isIntro ||
@@ -186,6 +186,7 @@ onRender((ctx) => {
useKeyDown(({ key, repeated }) => { useKeyDown(({ key, repeated }) => {
if ( if (
repeated ||
currentAnimation || currentAnimation ||
store.isIntro || store.isIntro ||
store.isOutro || store.isOutro ||