summaryrefslogtreecommitdiff
path: root/examples/vecanim/test
diff options
context:
space:
mode:
Diffstat (limited to 'examples/vecanim/test')
-rw-r--r--examples/vecanim/test/intro.script29
-rw-r--r--examples/vecanim/test/live.script24
2 files changed, 53 insertions, 0 deletions
diff --git a/examples/vecanim/test/intro.script b/examples/vecanim/test/intro.script
new file mode 100644
index 0000000..9dd61bb
--- /dev/null
+++ b/examples/vecanim/test/intro.script
@@ -0,0 +1,29 @@
+# Plays the intro headless on the GPU, with screenshots along the way,
+# then the same instants on the CPU renderer.
+frames 60
+screenshot .zig-cache/e2e/title.png
+console set deck.t 7.5
+frames 1
+screenshot .zig-cache/e2e/shapes.png
+console set deck.t 13
+frames 1
+screenshot .zig-cache/e2e/morph.png
+console set deck.t 16.5
+frames 1
+screenshot .zig-cache/e2e/zoom.png
+console set deck.t 24
+frames 1
+screenshot .zig-cache/e2e/text.png
+key b
+expect backend cpu
+console set deck.t 13
+frames 1
+screenshot .zig-cache/e2e/morph-cpu.png
+console set deck.t 24
+frames 1
+screenshot .zig-cache/e2e/text-cpu.png
+key g
+expect guides true
+console set deck.t 16.5
+frames 1
+screenshot .zig-cache/e2e/guides.png
diff --git a/examples/vecanim/test/live.script b/examples/vecanim/test/live.script
new file mode 100644
index 0000000..d955b6f
--- /dev/null
+++ b/examples/vecanim/test/live.script
@@ -0,0 +1,24 @@
+# Plays the live scene headless: it waits at each pause for a click, the
+# wave running on, the dots follow the pointer, and the guides draw over
+# everything.
+frames 150
+expect t 2
+screenshot .zig-cache/e2e/live-title.png
+click 640 360
+move 900 360
+frames 300
+screenshot .zig-cache/e2e/live-wave.png
+key g
+frames 1
+screenshot .zig-cache/e2e/live-guides.png
+key g
+click 640 360
+frames 150
+screenshot .zig-cache/e2e/live-damped.png
+key b
+expect backend cpu
+frames 1
+screenshot .zig-cache/e2e/live-damped-cpu.png
+click 640 360
+frames 120
+screenshot .zig-cache/e2e/live-end.png