Skip to content

feat(registry): add the cosmic-orb hero object - #3109

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
feat/primitive-cosmic-orb
Closed

feat(registry): add the cosmic-orb hero object#3109
miguel-heygen wants to merge 1 commit into
mainfrom
feat/primitive-cosmic-orb

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

cosmic-orb: an iridescent sphere of nebula bands, dust lanes and discrete stars behind a refracting glass limb.

Why

The catalog is passes, wipes, type and lower thirds. It has almost no hero objects. An orb like this carries a title card by itself, works as a logo pedestal, and runs indefinitely.

How

The sphere is analytic rather than raymarched, so cost is flat per pixel: z = sqrt(1 - r^2) gives the normal directly. One hash drives every noise layer. The limb samples a back layer at three refraction indices, which is what produces the chromatic fringing at the edge.

The repaint is driven from a property setter on the tweened driver, not from a timeline onUpdate callback. This is the part worth reviewing. GSAP's seek(pos, suppressEvents) defaults suppressEvents to true, so the callback pattern leaves the canvas frozen on frame 0 under any consumer that seeks without opting out. In a bare page, t=0, t=6.0 and t=6.2 produced byte-identical pixels. Tweened values are always written during render, suppressed or not, so the setter is the reliable hook and it receives the frame time directly.

The beat hook is closed form: pulseEnvelope is comma-separated samples spread across the clip and lerp-sampled at t. No audio analysis, no state.

Nine variables, every number carrying min, max and step.

Test plan

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)

hyperframes check passes with 0 errors: lint 0 errors, runtime 0 errors, layout 0 issues across 9 samples, motion 0, contrast 0. The four runtime warnings are the checker's own ReadPixels GPU-stall notices. oxfmt --check clean.

WebGL surviving seek-capture was the main risk, so it was tested directly rather than assumed. Six frames captured by snapshot and looked at: the orb is present in every one, the starfield and nebula rotate between frames, and the glass limb and chromatic fringing hold throughout. A full 300-frame 1920x1080 render also completed.

Determinism, all four cases identical:

direct seek(6.0)                    ==
playback 0 -> 6.0 in 0.1s steps     ==
out-of-order scrub 9.9,1.2,7.4,0,6.0 ==
repeated 6.0,3.0,6.0

Seven sampled times produced seven distinct hashes, which rules out the identical-because-static failure. Two separate CLI processes produced the same md5 at t=4.

Not covered

The catalog preview assets (docs/images/catalog/blocks/cosmic-orb.{png,mp4}) are not generated; the mdx points at those URLs and they will 404 until scripts/upload-docs-images.sh runs with the publishing profile. That is a maintainer step.

Not a seamless loop: the noise is not periodic in rotation, so it runs indefinitely but does not cut back to frame 0.

An iridescent sphere of nebula bands, dust lanes and discrete stars behind
a refracting glass limb. The catalog is passes, wipes, type and lower
thirds; it has almost no hero objects, and this one carries a title card
by itself.

The sphere is analytic rather than raymarched, so cost is flat per pixel:
z = sqrt(1 - r squared) gives the normal directly. One hash drives every
noise layer. The limb samples a back layer at three refraction indices,
which is what produces the chromatic fringing at the edge.

The repaint is driven from a property setter on the tweened driver rather
than from a timeline onUpdate callback. GSAP suppresses events on seek by
default, so the callback pattern leaves the canvas frozen on frame 0 under
any consumer that seeks without opting out. Tweened values are always
written during render, suppressed or not.

Verified under software WebGL: direct seek, stepped playback, out-of-order
scrub and a repeated seek all produce identical bytes, with seven distinct
hashes across seven times ruling out a vacuous pass.
@mintlify

mintlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hyperframes 🟢 Ready View Preview Aug 8, 2026, 6:24 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Superseded by #3116, which carries all five video primitives in one PR as requested. Same commits, same verification; nothing dropped.

@miguel-heygen
miguel-heygen deleted the feat/primitive-cosmic-orb branch August 9, 2026 15:42
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