Repository navigation
Camera: keep arrow and chart labels whole, and no close-up on icons without words - #39
Merged
Merged
Conversation
…ne outside the frame is left out
…or box without words
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 testpasses (224 tests).