summaryrefslogtreecommitdiff
path: root/examples/noc/test/path_following.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/path_following.script
parent82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff)
downloadsketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz
sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/path_following.script')
-rw-r--r--examples/noc/test/path_following.script22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/noc/test/path_following.script b/examples/noc/test/path_following.script
new file mode 100644
index 0000000..0a879b5
--- /dev/null
+++ b/examples/noc/test/path_following.script
@@ -0,0 +1,22 @@
+# Two vehicles follow a four-point path; the slower one drifts wider.
+# Space hides the debugging lines; a click makes a new path.
+expect path[1][0] 105.627 ~0.001
+frames 240
+expect cars[0].position[0] 353.657 ~0.001
+expect cars[1].position[1] 239.221 ~0.001
+screenshot .zig-cache/e2e/path_following.png
+key space
+expect debug false
+frames 1
+screenshot .zig-cache/e2e/path_following-plain.png
+click 320 180
+key space
+frames 120
+expect path[2][1] 198.958 ~0.001
+expect cars[1].position[0] 109.937 ~0.001
+# The road is 200 gray everywhere, its round joins included: translucent
+# black drawn once.
+expect-pixel .zig-cache/e2e/path_following-plain.png 105 80 200 200 200 255
+expect-pixel .zig-cache/e2e/path_following-plain.png 420 285 200 200 200 255
+expect-pixel .zig-cache/e2e/path_following-plain.png 110 100 200 200 200 255
+screenshot .zig-cache/e2e/path_following-new.png