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 172c78541c
commit 76473ec0ea

View File

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