summaryrefslogtreecommitdiff
path: root/examples/noc/test/fluid_resistance.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/fluid_resistance.script
parent82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff)
downloadsketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz
sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/fluid_resistance.script')
-rw-r--r--examples/noc/test/fluid_resistance.script13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/noc/test/fluid_resistance.script b/examples/noc/test/fluid_resistance.script
new file mode 100644
index 0000000..4208882
--- /dev/null
+++ b/examples/noc/test/fluid_resistance.script
@@ -0,0 +1,13 @@
+# Four seconds: the movers have fallen into the liquid and slowed down;
+# the first rests on the floor (360 minus its radius).
+frames 240
+expect movers[0].position[1] 350.94 ~0.01
+expect movers[4].mass 1.0985 ~0.001
+expect movers[4].velocity[1] 0.3603 ~0.001
+# A click starts them over at the top with new masses, and they fall again.
+click 320 180
+expect movers[4].position[1] 0.1 ~0.001
+expect movers[4].mass 2.3238 ~0.001
+frames 80
+expect movers[4].position[1] 229.95 ~0.01
+screenshot .zig-cache/e2e/fluid_resistance.png