feat: improve planty ux

This commit is contained in:
2026-04-20 21:23:55 +02:00
parent 7ebb1297ac
commit 58d39cd101
12 changed files with 141 additions and 98 deletions

View File

@@ -69,6 +69,12 @@
cursorY = e.clientY;
}
export function flash(flashMood: Mood, duration = 500) {
const prev = displayMood;
mood = flashMood;
setTimeout(() => (mood = prev), duration);
}
function pupilOffset(cx: number, cy: number, eyeSvgX: number, eyeSvgY: number, maxPx = 2.8) {
const ex = x + eyeSvgX;
const ey = y + eyeSvgY;