feat(nds): improve key input system

This commit is contained in:
2026-02-10 16:28:54 +01:00
parent a586c149d8
commit 14b9ee6119
16 changed files with 59 additions and 102 deletions

View File

@@ -139,7 +139,7 @@ const select = (col: number, row: number) => {
app.setColor(col, row);
};
useKeyDown((key) => {
useKeyDown(({ key }) => {
if (isAnimating.value) return;
switch (key) {

View File

@@ -302,7 +302,7 @@ onRender((ctx) => {
);
}, 110);
useKeyDown((key) => {
useKeyDown(({ key }) => {
if (state.value !== "alive") return;
const newDirection = direction.clone();