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/path_following.reload.script | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/noc/test/path_following.reload.script (limited to 'examples/noc/test/path_following.reload.script') diff --git a/examples/noc/test/path_following.reload.script b/examples/noc/test/path_following.reload.script new file mode 100644 index 0000000..a8cb61e --- /dev/null +++ b/examples/noc/test/path_following.reload.script @@ -0,0 +1,28 @@ +# Live reload keeps State: a new path, a paused replay, the edited build +# ({v2}: a blue road), the same path and vehicles after it, then play on. +frames 30 +click 320 180 +frames 30 +console record 0 +frames 30 +console stop +console play 0 +frames 10 +console pause +frames 2 +expect path[1][0] 117.856 ~0.001 +expect cars[1].position[0] 88.606 ~0.001 +screenshot .zig-cache/e2e/path_following-before.png +frames 1 +load {v2} +expect path[1][0] 117.856 ~0.001 +expect cars[1].position[0] 88.606 ~0.001 +frames 2 +screenshot .zig-cache/e2e/path_following-after.png +frames 1 +# The road changed colour; the vehicles did not move. +expect-different-screenshot .zig-cache/e2e/path_following-before.png .zig-cache/e2e/path_following-after.png +# Unpaused: the replay goes on from where it was. +console pause +frames 15 +expect clock.count 86 -- cgit v1.3