Commit Graph
3 Commits
Author SHA1 Message Date
Vance IngallsandClaude Opus 5.5 37a79e9371 fix(registry): clamp filmed-screen's curve and vignette (#5501)
* fix(registry): clamp filmed-screen's curve and vignette

Post-merge review of #5499:

- curve is clamped at 0: a negative value samples outside the frame and
  folds over below about -0.32.
- the vignette factor is clamped at 0: above vignette ~1.11 it went
  negative in the corners.
- README: a "previous look" line with the pre-#5499 values, noting that
  the LED fade-in threshold and the trace of fringing on the focused
  element are hard-coded.

The demo renders the same: at the defaults neither clamp is reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(registry): point filmed-screen's catalog page at its recorded preview

The catalog builds this item's payload as unsupported (it needs
canvas-draw-element), and without preview.video the page fell back to the
flag notice: "Needs chrome://flags/#canvas-draw-element to render live"
under a "Recorded preview" caption, with no video, whatever the visitor's
flags. The manifest now names the CDN video and poster the way the
liquid-glass blocks do; the regenerated page carries video= and poster=
instead of needsFlag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:52:18 +00:00
Vance IngallsandClaude Opus 5.5 3886aaec28 feat(registry): filmed-screen curves, orbits and follows typing by default (#5499)
New options, with defaults tuned on a white page filmed the way Vox shoots
screens:

- vignette (1.0, was a fixed 0.42) and aberration (2.2x, with a quarter of
  it kept on the focused text so it still reads as glass)
- curve (0.15): a barrel bend normalised so the frame's corners stay put
- led (0.45): the LED grid now only fades in once a cell spans ~4 output
  px; finer, it aliased into moire on light pages
- tiltTo per shot: the tilt eases between the two, for an orbit
- rack 0.3 (was 0.7), fast enough to follow text as it is typed, and shot
  blur 0.45 (was 0.9)

The demo is now a white search homepage for a made-up engine, "lumen": a
query types letter by letter while the camera follows each new letter and
orbits from one side of the screen to the other, all on defaults.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:12:21 -07:00
Vance IngallsandClaude Opus 5.5 071ce8044f feat(registry): add filmed-screen component (#5487)
* feat(registry): add filmed-screen component

Films a live-DOM scene like a camera pointed at a monitor: a tilted screen
plane in perspective, depth of field that follows a named element, chromatic
fringing, LED sub-pixels, per-shot palettes and cut tears. The focused element
stays sharp. Ported from ff-tracking's lens.sksl, with each colour channel
weighted by its own sample in the bokeh average.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(registry): land the filmed-screen catalog poster on the title

The catalog poster is captured at min(3 s, 0.6 × duration), which was the
demo's first cut, so it showed a tear over a blurred title. The first cut
moves to 3.8 s and the first shot racks back to the title before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(registry): filmed-screen glides between shots and racks focus

Shots now glide into each other by default: camera, palette and colour mode
ease over `glide` seconds, and `transition: "cut"` keeps the hard cut with its
tear. Focus racks instead of snapping: the focus box is a Hann-weighted
average of where it was over the last `rack` seconds, so a new target eases in
on an S-curve and every seek order still renders the same frame.

The demo now films three scenes in the style of other compositions, a code
editor, an analytics card and a chat thread, one shot and grade each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(registry): filmed-screen shares the composite slot and films each instance

Review on #5487:

- The composite hooks no longer cycle with data-vfx-chain. Both re-arm every
  seek, and core's resolver reads its prior when called, so a stale wrapper
  of ours is re-entered through it. Each wrapper now keeps its own prior and
  returns at once when re-entered, so the chain stays a constant depth. The
  slot is only claimed once a lens is mounted.
- A second instance films its own canvas. mount() takes the snippet's
  caller-scoped query result and picks the first canvas not already filmed;
  the library's own document belongs to whichever copy loaded first.
- No WebGL2 now steps aside like no HTML-in-Canvas. mount() returns
  { destroy() }, a lens whose canvas leaves the page is dropped, and a lens
  whose composition is not on screen skips its capture instead of logging.
- Docs: fadeOut and zIndex, the rack comment, and the description and tags
  now describe glides instead of cuts.

filmed-screen.test.mjs runs both arm orders against core's arming pattern,
two mounts over two canvases, and that the demo pastes the snippet's library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(registry): filmed-screen test passes oxlint

The vfx stand-in returned `true || prior`, which oxlint rejects as a
constant-truthiness expression.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(registry): match script tags case-insensitively in the filmed-screen test

CodeQL reads the extraction regexps as HTML filters (js/bad-tag-filter).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(registry): filmed-screen waits for the scene's first paint instead of erroring

In Studio's preview the first draw can run before Chrome has painted the
layoutsubtree scene once (the paint wait gives up after 250 ms on a busy
machine). drawElementImage then throws "No cached paint record", which was
logged with console.error and surfaced as a preview console error. That
error is now a wait: the lens requests a paint and draws again when it
lands. Other capture failures still log.

Render output is unchanged: the demo renders byte-identical to before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:56:38 -07:00