summaryrefslogtreecommitdiff
path: root/examples/noc/test/bouncing_ball.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/bouncing_ball.script
parent82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff)
downloadsketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz
sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/bouncing_ball.script')
-rw-r--r--examples/noc/test/bouncing_ball.script8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/noc/test/bouncing_ball.script b/examples/noc/test/bouncing_ball.script
new file mode 100644
index 0000000..b9e6a74
--- /dev/null
+++ b/examples/noc/test/bouncing_ball.script
@@ -0,0 +1,8 @@
+# x passes 640 after 216 steps, y passes 360 after 130: by frame 300 the
+# ball has come off both walls and heads back up-left.
+frames 300
+expect velocity[0] -2.5
+expect velocity[1] -2
+expect position[0] 437.5 ~0.01
+expect position[1] 26 ~0.01
+screenshot .zig-cache/e2e/bouncing_ball.png