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
Is rendering parity with Remotion/Hyperframes realistic in the near future #13
There's a large corpus of projects which publish nice-looking Hyperframes/Remotion components and themes.
I tried this one with raea and it almost worked, but there were a few rough edges, like raea couldn't measure text before it was rendered (required for one of the animations):
Curious for your thoughts on whether mapping HTML to bevy UI components is akin to building a browser, and how far we are from, say 95% parity / things just work out of the box
raea doesn't map HTML onto Bevy UI widgets. It embeds a real browser engine (Blitz, with Servo's stylo for CSS and parley for text) and measures itself against Chrome and the web-platform tests, fixing the gaps as they turn up; many of this week's issues were exactly that. Your text-measurement case sounds like a concrete gap. We'll run the snapcn.dev components through raea, file what breaks, and fix it.
First tally: we ran snapcn's 61 free (MIT) components through raea and compared each against Chrome.
25 of 61 match Chrome (SSIM ≥ 0.98 at both frames checked), 14 render but differ, and 22 fail to render.
How we compared:
Each component was rendered with its default props at mid-way and at its last frame.
On the raea side, remotion imports point at raea's own Remotion-shaped API.
The Chrome side is the same TSX under React DOM, at the same frame.
Neither side loads the Google fonts yet, so this compares layout and drawing with fallback faces. Fonts are next.
The failures fall into four issues:
Compositions can't measure text or layout: no document, no canvas measureText, no geometry on refs #54, text and layout measurement (your case, I think): 11 crash and about 8 drift. A composition has no document, so there's no canvas measureText and no document.fonts. An element from a ref also has no offsetWidth, getBoundingClientRect, children or querySelectorAll. word-gather, text-reveal, karaoke-captions, word-captions, title-sweep and spec-sweep are among them.
Updated tally for snapcn's 61 components, after #57 (ffd2738) and font loading (ac39b67). A component matches when SSIM against Chrome is ≥ 0.98 at both its mid and last frame.
before
now
match Chrome
25
28
render, but differ
14
18
fail
22
15
Build and method: raea from main at ac39b67. Each component rendered to mp4, with ffmpeg pulling the mid and last frames. --at has a regression on today's tree, which is being fixed separately. Chrome runs the same component with React DOM in raea's clock, on a page whose background matches the mp4 backdrop.
What moved:
Video with a remote (https) src is read as a local path #57, remote video srcs: all seven components that refused now render: hero-launch, laptop-frame, phone-frame, phone-stack, reel-collage, reel-wall, screen-recording. They count as "differ" because the harness's Chrome <video> isn't seeked to the composition's frame (it shows another moment of the clip), not because raea's frame is wrong.
Fonts:loadFont(family) from raea/text now loads a Google Fonts family by name, once, through raea's cache. That moved roster-grant, prompt-zoom, text-swell and word-flip to matching. block-wordmark slipped from 0.986 to 0.981.
@shinyobjectz thanks for this. these were the components we had issues with when trying out of the box:
Two snapcn components needed DOM measurement: Text Reveal and Word Flip.
Text Reveal: it measures the sentence on the page to decide where the big opening word starts before it shrinks into place. In raea, a React ref is only a bare {id, type, kind} handle, with no offsetWidth, offsetLeft or getBoundingClientRect. I also couldn’t find a canvas to measure text with in raea. I swapped in an estimate based on font size and character count, which left “Outpost” slightly right of center.
Word Flip: it measures its words the same way, to size the slot the word flips in, so it got the same estimate patch. That left a slightly wide gap before “overnight”.
Word Flip also exposed two other raea gaps, unrelated to measurement:
visibility: hidden is ignored. Word Flip renders a hidden copy of the words to measure them, and raea drew that copy on frame 0. The invisible spacer word that holds the slot’s height also showed up as a fake “features”. Adding opacity: 0 fixed both.
No gradient-filled text. raea doesn’t draw background-clip: text, so the gradient word drew as a solid blue-to-purple block. I settled on one solid blue.
The other two components ported with only the import change: Laptop Frame (its 3D tilt and screen image worked as written) and Terminal Simulator.
An update for 0.1.2, using snapcn's components as the test set. #54 had the details; in short, a composition's refs and document now measure from the same layout and fonts that draw the frame, so components that measure text before they draw work as written.
Measured against headless Chrome on snapcn's 33 measuring components (every text run within 1 px at three frames): 3 passed before, and 23 pass now. Among those:
text-reveal and word-flip match. Letters set one per span keep their kerning, and a visibility: hidden word keeps its place without being drawn (word-flip's strut no longer shows).
loadFont families are measured and drawn at every weight, and they're loaded before a component's first effect measures.
karaoke-captions, word-captions, bloom-lockup, wordmark-cut, punch-lines, text-rewrite and card-rail's layout all land.
The 10 still off are listed in docs/layout-reads.feature (LR10) with their causes. Most are within 2 px (ink under transforms, SF's tracking on canvas).
On your question: raea already lays out with a real CSS engine (Blitz: Stylo, Taffy and Parley), so this is closer to finishing a browser's last mile than building one. We're measuring that mile component by component against Chrome, and every gap we find becomes a test.
Activity
shinyobjectz commentedon Nov 8, 2026
raea doesn't map HTML onto Bevy UI widgets. It embeds a real browser engine (Blitz, with Servo's stylo for CSS and parley for text) and measures itself against Chrome and the web-platform tests, fixing the gaps as they turn up; many of this week's issues were exactly that. Your text-measurement case sounds like a concrete gap. We'll run the snapcn.dev components through raea, file what breaks, and fix it.
shinyobjectz commentedon Nov 8, 2026
First tally: we ran snapcn's 61 free (MIT) components through raea and compared each against Chrome.
25 of 61 match Chrome (SSIM ≥ 0.98 at both frames checked), 14 render but differ, and 22 fail to render.
How we compared:
remotionimports point at raea's own Remotion-shaped API.The failures fall into four issues:
document, so there's no canvasmeasureTextand nodocument.fonts. An element from a ref also has nooffsetWidth,getBoundingClientRect,childrenorquerySelectorAll. word-gather, text-reveal, karaoke-captions, word-captions, title-sweep and spec-sweep are among them.src: 7 components (hero-launch, laptop-frame, phone-frame and others) that play remote demo clips.setTransformandcreateImageData: dot-bloom and orb-swarm.requestAnimationFrameorImage: pulsing-border and capture-reveal.@kevinschaich, which component did you hit? If it isn't covered by #54, we'll file it too. We're starting on #54, since it's the largest group.
A <Video> whose src is an http(s) URL plays it, fetched once into rae…
raea/text loadFont: a composition asks for a Google Fonts family by n…
shinyobjectz commentedon Nov 8, 2026
Updated tally for snapcn's 61 components, after #57 (ffd2738) and font loading (ac39b67). A component matches when SSIM against Chrome is ≥ 0.98 at both its mid and last frame.
Build and method: raea from main at ac39b67. Each component rendered to mp4, with ffmpeg pulling the mid and last frames.
--athas a regression on today's tree, which is being fixed separately. Chrome runs the same component with React DOM in raea's clock, on a page whose background matches the mp4 backdrop.What moved:
<video>isn't seeked to the composition's frame (it shows another moment of the clip), not because raea's frame is wrong.loadFont(family)fromraea/textnow loads a Google Fonts family by name, once, through raea's cache. That moved roster-grant, prompt-zoom, text-swell and word-flip to matching. block-wordmark slipped from 0.986 to 0.981.document/DOM measurement (Compositions can't measure text or layout: no document, no canvas measureText, no geometry on refs #54), canvas setTransform and createImageData (Composition canvas 2D context is missing setTransform and createImageData #55), or requestAnimationFrame and Image (Compositions lack requestAnimationFrame and Image #56). Those wait on a decision about the composition runtime.@kevinschaich, if the component you hit is in that list, tell me which and I'll put it first.
A composition that paints no background is black behind it in a video…
kevinschaich commentedon Nov 9, 2026
@shinyobjectz thanks for this. these were the components we had issues with when trying out of the box:
Two snapcn components needed DOM measurement: Text Reveal and Word Flip.
Text Reveal: it measures the sentence on the page to decide where the big opening word starts before it shrinks into place. In raea, a React ref is only a bare {id, type, kind} handle, with no offsetWidth, offsetLeft or getBoundingClientRect. I also couldn’t find a canvas to measure text with in raea. I swapped in an estimate based on font size and character count, which left “Outpost” slightly right of center.
Word Flip: it measures its words the same way, to size the slot the word flips in, so it got the same estimate patch. That left a slightly wide gap before “overnight”.
Word Flip also exposed two other raea gaps, unrelated to measurement:
visibility: hidden is ignored. Word Flip renders a hidden copy of the words to measure them, and raea drew that copy on frame 0. The invisible spacer word that holds the slot’s height also showed up as a fake “features”. Adding opacity: 0 fixed both.
No gradient-filled text. raea doesn’t draw background-clip: text, so the gradient word drew as a solid blue-to-purple block. I settled on one solid blue.
The other two components ported with only the import change: Laptop Frame (its 3D tilt and screen image worked as written) and Terminal Simulator.
LR11: where the docs stand (the manual's web-components guide, raea-s…
LR10: kerning across spans, hidden inline words, and a render manifes…
shinyobjectz commentedon Nov 13, 2026
An update for 0.1.2, using snapcn's components as the test set. #54 had the details; in short, a composition's refs and
documentnow measure from the same layout and fonts that draw the frame, so components that measure text before they draw work as written.Measured against headless Chrome on snapcn's 33 measuring components (every text run within 1 px at three frames): 3 passed before, and 23 pass now. Among those:
visibility: hiddenword keeps its place without being drawn (word-flip's strut no longer shows).loadFontfamilies are measured and drawn at every weight, and they're loaded before a component's first effect measures.The 10 still off are listed in
docs/layout-reads.feature(LR10) with their causes. Most are within 2 px (ink under transforms, SF's tracking on canvas).On your question: raea already lays out with a real CSS engine (Blitz: Stylo, Taffy and Parley), so this is closer to finishing a browser's last mile than building one. We're measuring that mile component by component against Chrome, and every gap we find becomes a test.
LR10, LR11: done. LR0 lists the gap left after LR1-LR10 (23 of 33 pas…