summaryrefslogtreecommitdiff
path: root/examples/noc/test/additive_blending.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/additive_blending.script
parent82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff)
downloadsketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz
sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/additive_blending.script')
-rw-r--r--examples/noc/test/additive_blending.script18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/noc/test/additive_blending.script b/examples/noc/test/additive_blending.script
new file mode 100644
index 0000000..9c0dc6a
--- /dev/null
+++ b/examples/noc/test/additive_blending.script
@@ -0,0 +1,18 @@
+# The pointer at three quarters of the width: a wind of 0.1 to the right.
+move 480 200
+frames 120
+expect wind 0.1 ~0.000001
+# Three particles a step, each living 41 steps.
+expect particles.len 123
+expect particles.buffer[0].lifespan 0
+expect particles.buffer[0].position[0] 401.646 ~0.01
+screenshot .zig-cache/e2e/additive_blending.png
+frames 1
+# Added up, the particles saturate to white where they crowd (4.8's
+# smoke, blended over, stays gray there: 244), and glow magenta
+# (255, 100, 255 at each particle's lifespan) where they thin out.
+expect-pixel .zig-cache/e2e/additive_blending.png 320 285 255 255 255 255
+expect-pixel .zig-cache/e2e/additive_blending.png 344 252 255 119 255 255 3
+expect-pixel .zig-cache/e2e/additive_blending.png 100 100 0 0 0 255
+# The arrow is added too: white on black either way.
+expect-pixel .zig-cache/e2e/additive_blending.png 340 49 127 127 127 255 2