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/flow_field.reload.script | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/noc/test/flow_field.reload.script (limited to 'examples/noc/test/flow_field.reload.script') diff --git a/examples/noc/test/flow_field.reload.script b/examples/noc/test/flow_field.reload.script new file mode 100644 index 0000000..acad47a --- /dev/null +++ b/examples/noc/test/flow_field.reload.script @@ -0,0 +1,27 @@ +# Live reload keeps State: a new field, a paused replay, the edited build +# ({v2}: blue vehicles), the same seed 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 flowfield.seed 2947 +expect vehicles[5].position[0] 595.765 ~0.01 +screenshot .zig-cache/e2e/flow_field-before.png +frames 1 +load {v2} +expect flowfield.seed 2947 +expect vehicles[5].position[0] 595.765 ~0.01 +frames 2 +screenshot .zig-cache/e2e/flow_field-after.png +frames 1 +expect-different-screenshot .zig-cache/e2e/flow_field-before.png .zig-cache/e2e/flow_field-after.png +# Unpaused: the replay goes on from where it was. +console pause +frames 15 +expect clock.count 86 -- cgit v1.3