diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
| commit | 6933f99ddb2d7103515d26838496309a807bba26 (patch) | |
| tree | 991c2fe7d4a57957222876e190fa4d16a0fb889c /examples/noc/test/recursive_tree.script | |
| parent | 82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff) | |
| download | sketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip | |
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/recursive_tree.script')
| -rw-r--r-- | examples/noc/test/recursive_tree.script | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/noc/test/recursive_tree.script b/examples/noc/test/recursive_tree.script new file mode 100644 index 0000000..c74b0b9 --- /dev/null +++ b/examples/noc/test/recursive_tree.script @@ -0,0 +1,22 @@ +# The pointer's x sets the angle between branches: none at the left edge. +frames 2 +expect angle 0 +screenshot .zig-cache/e2e/recursive_tree-straight.png +frames 1 +# Every branch stacked on the trunk: one line, 2 px wide, from the bottom +# to about 300 px up (100 + 67 + 45 + ... until a branch is under 2 px). +expect-pixel .zig-cache/e2e/recursive_tree-straight.png 319 100 0 0 0 255 +expect-pixel .zig-cache/e2e/recursive_tree-straight.png 320 100 0 0 0 255 +expect-pixel .zig-cache/e2e/recursive_tree-straight.png 321 100 255 255 255 255 +expect-pixel .zig-cache/e2e/recursive_tree-straight.png 320 40 255 255 255 255 +# At three quarters of the width, 3/8 of a turn. +move 480 200 +frames 2 +expect angle 1.1781 ~0.0001 +screenshot .zig-cache/e2e/recursive_tree.png +frames 1 +expect-pixel .zig-cache/e2e/recursive_tree.png 319 340 0 0 0 255 +expect-pixel .zig-cache/e2e/recursive_tree.png 321 340 255 255 255 255 +# A slanted branch: its edge pixels are gray, antialiased natively too. +expect-pixel .zig-cache/e2e/recursive_tree.png 376 235 128 128 128 255 24 +expect-pixel .zig-cache/e2e/recursive_tree.png 379 234 64 64 64 255 24 |
