From 71e534631bf68f33f802d64794340870374b9f69 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 11:27:39 -0300 Subject: sketchbook: anim, manim-style scenes as a module (from the game's vecanim), with objects a scene draws itself The player takes its canvas from the room it has and fits the scene's frame into it, plays through and quits when exported, and draws vector objects in runs around custom ones. The renderers' resvg comparison and the timings come along as `zig build diff` and `zig build bench`; the comparison's reference is padded to whole blocks rather than squeezed, which had put Typst text over the limit. Co-Authored-By: Claude Fable 5.2 --- test/svg/dashes.svg | 6 ++++++ test/svg/fill-rules.svg | 6 ++++++ test/svg/gradients.svg | 16 ++++++++++++++++ test/svg/opacity.svg | 7 +++++++ test/svg/paths.svg | 8 ++++++++ test/svg/shapes.svg | 8 ++++++++ test/svg/strokes.svg | 11 +++++++++++ test/svg/transforms.svg | 13 +++++++++++++ test/svg/typst-equation.typ | 3 +++ test/svg/typst-shapes.typ | 8 ++++++++ test/svg/typst-text.typ | 5 +++++ test/svg/use.svg | 11 +++++++++++ 12 files changed, 102 insertions(+) create mode 100644 test/svg/dashes.svg create mode 100644 test/svg/fill-rules.svg create mode 100644 test/svg/gradients.svg create mode 100644 test/svg/opacity.svg create mode 100644 test/svg/paths.svg create mode 100644 test/svg/shapes.svg create mode 100644 test/svg/strokes.svg create mode 100644 test/svg/transforms.svg create mode 100644 test/svg/typst-equation.typ create mode 100644 test/svg/typst-shapes.typ create mode 100644 test/svg/typst-text.typ create mode 100644 test/svg/use.svg (limited to 'test/svg') diff --git a/test/svg/dashes.svg b/test/svg/dashes.svg new file mode 100644 index 0000000..ebd9ce6 --- /dev/null +++ b/test/svg/dashes.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/svg/fill-rules.svg b/test/svg/fill-rules.svg new file mode 100644 index 0000000..af0e3b8 --- /dev/null +++ b/test/svg/fill-rules.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/svg/gradients.svg b/test/svg/gradients.svg new file mode 100644 index 0000000..a5f2c81 --- /dev/null +++ b/test/svg/gradients.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/test/svg/opacity.svg b/test/svg/opacity.svg new file mode 100644 index 0000000..c0d0b8a --- /dev/null +++ b/test/svg/opacity.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test/svg/paths.svg b/test/svg/paths.svg new file mode 100644 index 0000000..173ec9e --- /dev/null +++ b/test/svg/paths.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/test/svg/shapes.svg b/test/svg/shapes.svg new file mode 100644 index 0000000..07aa01a --- /dev/null +++ b/test/svg/shapes.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/test/svg/strokes.svg b/test/svg/strokes.svg new file mode 100644 index 0000000..6a25a16 --- /dev/null +++ b/test/svg/strokes.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test/svg/transforms.svg b/test/svg/transforms.svg new file mode 100644 index 0000000..0eb7756 --- /dev/null +++ b/test/svg/transforms.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/test/svg/typst-equation.typ b/test/svg/typst-equation.typ new file mode 100644 index 0000000..da0c34c --- /dev/null +++ b/test/svg/typst-equation.typ @@ -0,0 +1,3 @@ +#set page(width: auto, height: auto, margin: 6pt, fill: none) +#set text(fill: rgb("#ece6e2"), size: 28pt) +$ integral_0^infinity e^(-x^2) dif x = sqrt(pi) / 2 $ diff --git a/test/svg/typst-shapes.typ b/test/svg/typst-shapes.typ new file mode 100644 index 0000000..b9bcdff --- /dev/null +++ b/test/svg/typst-shapes.typ @@ -0,0 +1,8 @@ +#set page(width: auto, height: auto, margin: 6pt, fill: none) +#stack(dir: ltr, spacing: 8pt, + rect(width: 60pt, height: 30pt, stroke: 2pt + red, fill: blue, radius: 5pt), + circle(radius: 16pt, fill: gradient.linear(red, blue)), + circle(radius: 16pt, fill: gradient.radial(yellow, purple)), + line(length: 60pt, stroke: (paint: green, thickness: 3pt, dash: "dashed")), + polygon(fill: teal, stroke: 1pt + white, (0pt, 20pt), (20pt, 0pt), (40pt, 20pt)), +) diff --git a/test/svg/typst-text.typ b/test/svg/typst-text.typ new file mode 100644 index 0000000..ce6281d --- /dev/null +++ b/test/svg/typst-text.typ @@ -0,0 +1,5 @@ +#set page(width: 300pt, height: auto, margin: 6pt, fill: none) +#set text(fill: rgb("#ece6e2"), size: 12pt) += Vector sketches +The quick brown fox jumps over the lazy dog. *Bold*, _italic_, `mono`, and +Unicode: é ß ñ — “quotes” — 1 ≤ 2 → ∞. diff --git a/test/svg/use.svg b/test/svg/use.svg new file mode 100644 index 0000000..5336f01 --- /dev/null +++ b/test/svg/use.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + -- cgit v1.3