Conversation
manim's vocabulary, none of manim. Mobjects, a scene, and `play` for one beat of it, rendered as a single inline SVG with a stylesheet in it. manim itself renders video, which wants cairo, ffmpeg and usually a LaTeX install, and none of that fits in the first cell of a Colab notebook or survives being saved into one. The mobjects are Box, Code, Caption, Arrow, Group and the Wash a highlight fades in. Code is a group with one mobject per line, so a pass can be shown doing what a pass does, which is to touch one instruction and leave the rest alone. The animations are fade_in, fade_out, move, highlight, pulse and draw. Three things this closes off deliberately: CSS keyframes, no script. The output goes into a saved notebook, into Colab's output sandbox and into static HTML, and script survives none of those reliably. It also animates as an ordinary <img>. The markup is the last frame. Elements are written out where they end up and the animation walks back to the start, so a renderer with no stylesheet, a printed page, and anybody who asked for less motion get the finished picture rather than a blank one. prefers-reduced-motion is honoured. `frame(t)` gives any other moment as a still. Easing is sampled here rather than handed to CSS, because a keyframe timing function applies per stop and the stops of one mobject end up interleaved with another's. Ninety seconds is the cap from CONTRIBUTING.md, and a scene over it raises rather than rendering. Also: irx.ir grows `pieces()`, which is the tokeniser loop that both irx.ir.highlight and irx.graphs already had a copy of, and now the three things that render IR agree about what a keyword is. docs/diagrams/pass-step.svg is the first scene, and the IR in it is what `opt -passes=dce -S` actually printed.
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.
The animation library from #10. It takes manim's vocabulary, mobjects and a
scene and
playfor one beat of it, and none of manim's implementation:manim renders video, which wants cairo, ffmpeg and usually a LaTeX install,
and none of that fits in the first cell of a Colab notebook or survives
being saved into one. What comes out of here is one inline
<svg>with astylesheet in it.
Mobjects:
Box,Code,Caption,Arrowwithlinkfor an arrow betweentwo of them,
Group, and theWasha highlight fades in.Codeis a groupwith one mobject per line, so a pass can be shown doing what a pass does,
which is to touch one instruction and leave the rest alone.
Animations:
fade_in,fade_out,move,highlight,pulse,draw.Print a scene and you get the storyboard, which is the form a review reads.
Show it in a notebook and you get the picture.
svg()writes a file andframe(t)gives one still with nothing moving in it.What this closes off, and why
Colab's output sandbox and into static HTML on the site, and script
survives none of those reliably. It also means the picture animates when
it is loaded as an ordinary
<img>, which script would not.up and the animation walks back to the beginning and forward again. A
renderer that drops the stylesheet, a printed page, and anybody whose
system asks for less motion all get the finished picture rather than an
empty box.
prefers-reduced-motion: reduceturns the animation offrather than being ignored.
applies per stop, and one mobject's stops get interleaved with another's,
which distorts the curve quietly.
CONTRIBUTING.md. A scene overit raises rather than rendering.
Also in here
irx.irgrowspieces(), the tokeniser loop thatirx.ir.highlightandirx.graphs._tspanseach had their own copy of. Three things render IR nowand they agree about what a keyword is.
docs/diagrams/pass-step.svgis the first scene, wired intobuild.py diagramslike the others, and byte stable across rebuilds because the onegenerated id in it is a content hash. The IR in it is what
opt -passes=dce -Sprinted, and the transcript is in the script that draws it.Checks
toolkit: 244 tests, OK (35 new, none of which need a compiler)ruff check .,build.py check,build.py diagramstwice with no diff,prosecheck,refcheck --ledgercleanPart of #10.