feat(projects): don't repeat key input and click on mouse down
This commit is contained in:
@@ -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 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user