| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A glyph with a counter blobbed through a morph: subpaths paired by their
index alone, so a hole with no partner (a 0 into a 5) collapsed onto the
end of the other glyph's outline, travelling out of its own shape and
leaving the counter filled, and one listed before its outline (or a shape
gaining a hole) was paired with the other side's outline, its winding
turned inside out. In manual's second slide the 0 became a black blob for
a third of its morph into the 5.
Now each pair of shapes sorts its subpaths, outer contours then holes (a
hole winds against the shape's largest subpath, as a font's counters do),
and pairs within each group. A hole with no partner shrinks to a point (or
grows from one) where its middle stands relative to the outer contours'
bounds on the other side, so it stays inside its shape as that moves. A
shape without a partner, or one with no hole, morphs as before, bit for
bit.
Test: test/scene_morph, a ring into a disc, a 0 into a 5 and a 0 whose
path lists its hole first into a ring, at a quarter, half and three
quarters on the GPU and on the CPU: each hole's middle is the background
(the 0 into the 5 while its hole is half its size or more), and the disc
and the 5 fill it at the end. The old pairing fails it at half way on all
three. What changed: the compiled test scene's equation morph (export
frames 32-59, compiled-morph.png: no stray dot from a's hole, b and a keep
their counters) and manual's three morphs of holed glyphs (exported
frames 28.1-29.3 s, C0 into 11 000 000; 55.7-56.9 s, the 0 into the 5;
58.8-60.4 s, ADD into SUB with the row). Everything else is byte-identical:
the talk's exports, every scene screenshot (manual's are taken at rest),
and zig build diff's corpus, which draws no morph.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typst places an SVG image, and a PDF page imported with image(), as an
<image> whose href is the document in base64; svg.zig skipped every
<image>, so any Typst object holding one silently lost it. The parser
now decodes such a document and walks it into the same drawing, mapped
into the image's x, y, width and height (stretched with
preserveAspectRatio="none", else fitted and centered, as SVG says),
with its own ids, gradients and percentages and nothing inherited from
around it but opacity. It is not clipped to its box (a PDF page never
draws outside itself, and a clip per shape costs the renderers a pass
over every contour). Raster images still draw nothing. The root's view
box and size come from one function both documents use.
Tests: a unit test at the end of svg.zig (ids of its own, stretched and
fitted corners, a PNG skipped); two corpus cases for zig build diff,
image.svg (two data-URI images, one stretched and turned, beside an
outer gradient that shares an id with an inner one) and typst-image.typ
(two SVGs placed by Typst): both renderers match resvg (mean 0.09-0.11).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |
|
| |
|
|
| |
spectrum, spectrogram), audio codecs and fonts, web host
|
|
|
The root is the game. The platform library moves to lib/sketchbook (with
serve_web.py, which serves any sketch's web build, as a tool of it), and
vecanim to sketches/vecanim, still its own package on the same library.
|