Skip to content

Camera: keep arrow and chart labels whole, and no close-up on icons without words - #39

Merged
vincentsch merged 4 commits into
mainfrom
camera-labels
Oct 19, 2026
Merged

vincentsch merged 4 commits into
mainfrom
camera-labels

Conversation

@vincentsch

Copy link
Copy Markdown
Owner

I rendered the 32 videos on explainroo.com again with the camera from 0.4 and compared every scene with the published version, at the middle and at the end. No scene lost anything in its last frame. Two things looked wrong in shots where the camera held still.

Labels. A close-up could cut an arrow's label in half. In the cache video, "asks for the page" showed as "age". The camera measured an arrow as a line, and lines may run off the edge of a close-up, but it did not measure the label at all. Charts had the same gap. A chart counted only as its plot area, so a close-up next to a line chart showed its axis numbers on their own at the top of the frame.

Now an arrow's label is measured where its letters land, and the camera keeps it whole like any other text. It still gets no close-up of its own, it does not count on its own when a scene continues the one before, and a label outside the frame is left out. A chart's labels, values, axis ends and dots now count as part of the chart. The box that arrows and s.get() use does not change.

Close-ups on icons without words. Some close-ups showed one icon without a label at full zoom, often against the top of the frame with the rest empty, like the people icon in the merge vs rebase video. A close-up helps when it makes words or details bigger. An icon without a label, or a box without words, shows nothing more up close, so the camera no longer moves in on one. It still frames them whole, follows them and pulls back to them. Images and drawings stay as they are, and s.focus() still gives anything a close-up.

What changes. In 21 of the 32 videos the camera stays exactly the same. In the other 11, 19 scenes change. Seven close-ups on icons without words are gone. The close-ups that cut an arrow's label, or showed a chart's numbers on their own, now frame them whole or leave them out. I compared each changed scene with the published video and with the current camera. AGENTS.md describes both rules.

New tests check that the measured boxes hold every pixel the labels draw, for straight and curved arrows, line charts, bars and pies. Others check that a labelled arrow gets no close-up, that its label does not change whether a scene continues the one before, and that icons and boxes without words get no close-up. npm test passes (224 tests).

@vincentsch
vincentsch merged commit 3176328 into main Oct 19, 2026
4 checks passed
@vincentsch
vincentsch deleted the camera-labels branch October 19, 2026 18:03
@vincentsch vincentsch mentioned this pull request Oct 20, 2026
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