mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
* feat(core): data-motion-blur-phase sets when the shutter opens Page motion blur always centres the shutter on the frame. Add a phase in degrees of a frame, -360 to 360: the window starts at t + phase / 360 / fps and lasts shutter / 360 / fps. Unset stays centred, so a page without the attribute renders the same bytes. Both tiers take the window from one place, shutterTimes in frames.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(core): the motion blur report carries the shutter phase Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * chore(core): drop the phaseDeg doc comment, the comment-share ratchet may only fall Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
Motion Blur
Fast-moving elements get a shutter smear along their path. It is opt-in: nothing blurs until the composition root has data-motion-blur="on".
Turn it on
data-motion-blur—onenables blur;offopts out, on the root or on any subtreedata-motion-blur-shutter— shutter angle in degrees, 0-720 (default: 240)data-motion-blur-phase— when the shutter opens, in degrees of a frame, -360 to 360: 0 opens on the frame (default: centred on the frame, which is minus half the shutter)data-motion-blur-samples— samples per frame, 2-64 (default: at least 32, sized to the smear)data-motion-blur-events—onruns timeline callbacks while blur looks for movers; needed when motion is set from arender(t)callbackdata-motion-blur-tier—auto(default),captureorfilter
The same attributes drive the browser editor preview and hyperframes render.
Two ways it is drawn
captureredraws each mover along its path, so turns and zooms smear truthfully. Needs a browser with HTML in Canvas.filterputs an SVG filter on each mover. Works in any Chrome and costs little; turns and zooms are only softened.
auto uses filter when every mover only translates and capture when anything turns or scales.
Check and render
npx hyperframes checkreportsmotion_blur_filter_fallback,motion_blur_no_moversandmotion_blur_unverifiedhyperframes render --page-motion-blur offrenders without the composition's blur- Blur is off for HDR, distributed, and sub-frame-blur renders
Full guide: https://hyperframes.heygen.com/guides/motion-blur