Skip to content

perf: cut per-frame work and cap goo blur - #1

Merged
ehsania merged 3 commits into
mainfrom
perf/smoother-morph
Nov 9, 2026
Merged

ehsania merged 3 commits into
mainfrom
perf/smoother-morph

Conversation

@ehsania

@ehsania ehsania commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cache the host font size per morph instead of reading computed styles on every animation frame.
  • Compose goo and rise blur into a single blur pass per element.
  • Add effects.goo.maxBlur (default 40px, clamped to 0–100px).
  • Skip blur work for fully transparent layers.
  • Avoid redundant inline style writes and stop promoting chunk spans for filter changes.
  • Make play() respect autoplay: false so manual morphs resume without starting auto-cycling.
  • Keep playground morphs animating after switching examples.

Testing

  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npm test — 107 passing
  • npm run build:lib

Notes

The Safari-specific CSS-threshold fallback for the goo filter is intentionally deferred to a follow-up.

@ehsania
ehsania merged commit 3519c24 into main Nov 9, 2026
1 check passed
@ehsania
ehsania deleted the perf/smoother-morph branch November 9, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant