You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compositions lack requestAnimationFrame and Image #56
From #13's run of snapcn's free components through raea: two browser globals that components use aren't defined in a composition.
requestAnimationFrame: pulsing-border, through @paper-design/shaders-react, throws "Can't find variable: requestAnimationFrame".
Image: capture-reveal preloads with new Image() and throws "Can't find variable: Image".
An app page (@raea/ui) has both. In a render, requestAnimationFrame could run its callbacks once per frame step, and new Image() could load from the media folder, as <img> does.
Fixed on main in 645b085; it ships in 0.1.3. Compositions now have these where the runtime has none:
requestAnimationFrame / cancelAnimationFrame: a callback runs once, at the next frame the composition draws, and gets that frame's time (frame * 1000 / fps ms). A frame drawn again (--at, a resumed render) gets the same calls.
Image: setting src fires load (and onload) on the next microtask, so a preload like capture-reveal's resolves. It reports no pixel size (naturalWidth stays 0). <img> still draws the file itself.
pulsing-border will still stop at @paper-design/shaders-react's WebGL2, which a composition doesn't have.
Activity
Compositions get the web's canvas 2D context, requestAnimationFrame a…
shinyobjectz commentedon Nov 12, 2026
Fixed on main in 645b085; it ships in 0.1.3. Compositions now have these where the runtime has none:
requestAnimationFrame/cancelAnimationFrame: a callback runs once, at the next frame the composition draws, and gets that frame's time (frame * 1000 / fpsms). A frame drawn again (--at, a resumed render) gets the same calls.Image: settingsrcfiresload(andonload) on the next microtask, so a preload like capture-reveal's resolves. It reports no pixel size (naturalWidthstays 0).<img>still draws the file itself.pulsing-border will still stop at
@paper-design/shaders-react's WebGL2, which a composition doesn't have.Fingerprint gets its own section of the docs (docs/manual/fingerprint…