summaryrefslogtreecommitdiff
path: root/examples/noc/test/noise_walker.script
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 21:28:20 -0300
committerGabriel Schneider <[email protected]>2026-11-16 21:28:20 -0300
commit6933f99ddb2d7103515d26838496309a807bba26 (patch)
tree991c2fe7d4a57957222876e190fa4d16a0fb889c /examples/noc/test/noise_walker.script
parent82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff)
downloadsketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz
sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/noise_walker.script')
-rw-r--r--examples/noc/test/noise_walker.script22
1 files changed, 22 insertions, 0 deletions
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