| Saw the window was a bit laggy so thought I'd delve deeper to figure out what was going on. This lib runs a a RAF animation loop every 8ms across every component on the page that causes the entire document to repaint. The comment above appears of the AI generated sort:
// One shared animation frame: step every live component, park when idle.
// The delta is capped so a background-tab pause never becomes one giant step. The "JellyEngine" instead of just calculating the jelly animation on pointer events is recalculating for every active component on the page every frame. This is the kind of thing usually a human notices and says 'dont do that, that is kind of crazy'. |
Agreed the comments look a bit slop-ish but I don't see anything obviously wrong with its approach, and the core loop is running in microseconds for me when nothing is happening.