fix(projects): block interactions during animation
This commit is contained in:
@@ -79,7 +79,7 @@ const startButtonAnimation = (type: ButtonType) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useScreenClick((x, y) => {
|
useScreenClick((x, y) => {
|
||||||
if (currentAnimation) return;
|
if (currentAnimation || store.isIntro || store.isOutro) return;
|
||||||
|
|
||||||
const project = store.projects[store.currentProject];
|
const project = store.projects[store.currentProject];
|
||||||
if (circleContains(BUTTONS.prev.position, [x, y], CLICK_RADIUS)) {
|
if (circleContains(BUTTONS.prev.position, [x, y], CLICK_RADIUS)) {
|
||||||
@@ -131,7 +131,7 @@ useRender((ctx) => {
|
|||||||
ctx.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
ctx.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
});
|
});
|
||||||
useKeyDown((key) => {
|
useKeyDown((key) => {
|
||||||
if (currentAnimation) return;
|
if (currentAnimation || store.isIntro || store.isOutro) return;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "NDS_LEFT":
|
case "NDS_LEFT":
|
||||||
startButtonAnimation("prev");
|
startButtonAnimation("prev");
|
||||||
|
|||||||
Reference in New Issue
Block a user