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/flocking.script | |
| parent | 82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff) | |
| download | sketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip | |
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/flocking.script')
| -rw-r--r-- | examples/noc/test/flocking.script | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/noc/test/flocking.script b/examples/noc/test/flocking.script new file mode 100644 index 0000000..7988bd1 --- /dev/null +++ b/examples/noc/test/flocking.script @@ -0,0 +1,21 @@ +# 120 boids burst from the center and form flocks; a drag adds one boid per +# pointer move while the button is down (mouseDragged), none for the press. +frames 120 +expect boids.len 120 +down 100 300 +move 110 300 +move 120 300 +move 130 300 +move 140 300 +move 150 300 +up 150 300 +expect boids.len 125 +# The last one was added at (150, 300) and has flown a step since. +expect boids.buffer[124].position[0] 150.77 ~0.01 +# A move without the button adds none. +move 200 200 +expect boids.len 125 +frames 120 +expect boids.buffer[0].position[0] 583.371 ~0.01 +expect boids.buffer[0].position[1] 327.445 ~0.01 +screenshot .zig-cache/e2e/flocking.png |
