Skip to content

Is rendering parity with Remotion/Hyperframes realistic in the near future #13

Open

Description

@kevinschaich

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):

https://snapcn.dev/docs/components

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

Activity

  1. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    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.

  2. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    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:

    @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.

  3. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    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:

    @kevinschaich, if the component you hit is in that list, tell me which and I'll put it first.

  4. kevinschaich commented on Nov 9, 2026

    @kevinschaich
    Author

    @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.

  5. shinyobjectz commented on Nov 13, 2026

    @shinyobjectz
    Owner

    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.

  6. added
    waiting on reporterCan't be reproduced or fixed without more information from whoever filed it
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting on reporterCan't be reproduced or fixed without more information from whoever filed it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions