d109a2559fe3

slow rune particles — gentle gravity, slow drift, long fade-in for passive magic feel

time
2026-04-28 15:49 UTC · 6 months ago
machine
koh2
parent
8a31f36f18f1
1 file src/popup/components/LockRuneCanvas.tsx+6 −6
src/popup/components/LockRuneCanvas.tsx+6 −6
@@ -2,11 +2,11 @@22 33 const FONT_SIZE = 14;44 const PARTICLE_COUNT = 5;5-const GRAVITY = 55;       // px/s² pull toward target, scales with 1/dist6-const MAX_SPEED = 90;     // px/s cap so nothing shoots through the input7-const ABSORB_DIST = 18;   // px from target center — particle disappears8-const FADE_OUT_DIST = 60; // px — fade starts here9-const FADE_IN_MS = 600;   // fade-in duration on spawn5+const GRAVITY = 14;        // px/s² pull toward target — gentle, intentional6+const MAX_SPEED = 28;      // px/s cap — slow drift, not a rush7+const ABSORB_DIST = 18;    // px from target center — particle disappears8+const FADE_OUT_DIST = 80;  // px — fade starts here, long and gradual9+const FADE_IN_MS = 1400;   // slow materialise on spawn1010 const FALLBACK_ACCENT = "#F49C70";1111 const FALLBACK_RUNE_IDLE_RGB = [245, 240, 234] as const;1212 const FALLBACK_RUNE_IDLE_LIGHT_RGB = [34, 24, 9] as const;@@ -61,7 +61,7 @@6161   // curl so particles trace curves rather than straight lines.6262   const dx = tx - x, dy = ty - y;6363   const len = Math.hypot(dx, dy) || 1;64-  const speed = 4 + Math.random() * 8;64+  const speed = 1.5 + Math.random() * 3;6565   const curl = (Math.random() < 0.5 ? 1 : -1) * (0.2 + Math.random() * 0.4);6666   const vx = (dx / len + (-dy / len) * curl) * speed;6767   const vy = (dy / len + (dx / len) * curl) * speed;

view file