From 634b9ca0a066bd671eec71404926401119c0af53 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 3 Jun 2026 17:30:54 -0700 Subject: [PATCH] Worker orbs: cache glow sprites for perf + SoulSync logo in enrichment modal topbar Performance: - Bake one soft glow sprite per colour into an offscreen canvas and blit it with drawImage instead of allocating a radial gradient every frame. This was the hot path: sparks + inbound pulses + every orb glow each built a gradient per frame (100+/frame at 60fps). Colours quantised to 8-step buckets to bound the cache (imperceptible tint shift, keeps the rainbow path from minting a sprite every frame). - Cache each orb's button element at init so the 30-frame active-state check no longer re-runs querySelector. - Net: the pulses/glows look identical, far fewer allocations per frame. UI: - Enrichment manager modal topbar icon now uses the SoulSync logo (trans2.png) instead of the helix emoji, matching the dashboard button. --- webui/static/enrichment-manager.js | 2 +- webui/static/style.css | 1 + webui/static/worker-orbs.js | 80 ++++++++++++++++++------------ 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/webui/static/enrichment-manager.js b/webui/static/enrichment-manager.js index b1ccfe60..9f8b0c28 100644 --- a/webui/static/enrichment-manager.js +++ b/webui/static/enrichment-manager.js @@ -149,7 +149,7 @@ async function openEnrichmentManager(workerId) {