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">
|
||||
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 ||
|
||||
|
||||
Reference in New Issue
Block a user