diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
| commit | 6933f99ddb2d7103515d26838496309a807bba26 (patch) | |
| tree | 991c2fe7d4a57957222876e190fa4d16a0fb889c /examples/noc/test/accel_to_mouse.reload.script | |
| parent | 82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff) | |
| download | sketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip | |
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/accel_to_mouse.reload.script')
| -rw-r--r-- | examples/noc/test/accel_to_mouse.reload.script | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/noc/test/accel_to_mouse.reload.script b/examples/noc/test/accel_to_mouse.reload.script new file mode 100644 index 0000000..ab516af --- /dev/null +++ b/examples/noc/test/accel_to_mouse.reload.script @@ -0,0 +1,31 @@ +# Live reload (design.md "Acceptance: live reload"): play a while, pause a +# replay so State holds still, load the edited build ({v2}: a smaller ball), +# check that State carried over and the picture changed where the edit shows. +move 560 300 +frames 60 +console record 0 +frames 30 +console stop +console play 0 +frames 10 +console pause +frames 2 +expect position[0] 581.173 ~0.001 +expect position[1] 310.586 ~0.001 +expect velocity[0] 3.5777 ~0.001 +screenshot .zig-cache/e2e/accel_to_mouse-before.png +frames 1 +load {v2} +expect position[0] 581.173 ~0.001 +expect position[1] 310.586 ~0.001 +expect velocity[0] 3.5777 ~0.001 +frames 2 +screenshot .zig-cache/e2e/accel_to_mouse-after.png +frames 1 +expect-different-screenshot .zig-cache/e2e/accel_to_mouse-before.png .zig-cache/e2e/accel_to_mouse-after.png 553 284 48 48 +# Playing on after the reload: State goes on from where it was. +console pause +frames 10 +expect position[0] 607.111 ~0.001 +expect position[1] 323.555 ~0.001 +expect velocity[0] 1.7889 ~0.001 |
