From 6933f99ddb2d7103515d26838496309a807bba26 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 21:28:20 -0300 Subject: Move standalone sketches into sketchbook examples --- examples/noc/test/noise_walker.script | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/noc/test/noise_walker.script (limited to 'examples/noc/test/noise_walker.script') diff --git a/examples/noc/test/noise_walker.script b/examples/noc/test/noise_walker.script new file mode 100644 index 0000000..b15c60a --- /dev/null +++ b/examples/noc/test/noise_walker.script @@ -0,0 +1,22 @@ +# One second of the walk, saved; four more; then the snapshot loads back. +# The trail is an offscreen image in Session, so the load (`in.jumped`) +# repaints it up to the loaded step: the screenshot shows two seconds of +# trail, not six, and equals a straight two-second run's. +frames 60 +console save 1 +expect clock.count 60 +expect walker.x 422.59 ~0.01 +expect walker.y 187.75 ~0.01 +frames 240 +console load 1 +expect clock.count 60 +frames 60 +expect clock.count 120 +screenshot .zig-cache/e2e/noise_walker.png +console reset +# The console line's frame takes the first step. +expect clock.count 1 +frames 119 +expect clock.count 120 +screenshot .zig-cache/e2e/noise_walker-straight.png +expect-same-screenshot .zig-cache/e2e/noise_walker.png .zig-cache/e2e/noise_walker-straight.png -- cgit v1.3