summaryrefslogtreecommitdiff
path: root/anim/scenes/title.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/scenes/title.zig')
-rw-r--r--anim/scenes/title.zig22
1 files changed, 22 insertions, 0 deletions
diff --git a/anim/scenes/title.zig b/anim/scenes/title.zig
new file mode 100644
index 0000000..3646da4
--- /dev/null
+++ b/anim/scenes/title.zig
@@ -0,0 +1,22 @@
+//! The card before the scenes: what the series is, and the marks every
+//! picture in it uses.
+const anim = @import("anim");
+const canim = @import("canim");
+
+pub const background = canim.background;
+pub const scene = anim.Live(frame, struct {});
+
+fn frame(s: *anim.Frame) void {
+ const size = canim.theme.size.sans;
+ const text = canim.theme.color.text;
+ const series = canim.label(s, .{ .text = "How programs really run", .box = .{ .x = 64, .y = 138, .w = 900, .h = 48 }, .size = size.kicker, .color = text.dim });
+ const title = canim.label(s, .{ .text = "Five small programs,\none step at a time", .box = .{ .x = 64, .y = 220, .w = 1792, .h = size.title_leading }, .face = .sans_bold, .size = size.title, .color = text.bright });
+ const under = canim.label(s, .{ .text = "recorded as they ran: every line, register and byte", .box = .{ .x = 64, .y = 500, .w = 1792, .h = 60 }, .face = .sans, .size = size.subtitle, .color = text.dim });
+ const marks = canim.legend(s, .{ .box = canim.theme.cols(0, 12, 512, 256) });
+ const t = canim.theme.time;
+ s.play(.{ series.fadeIn(), title.fadeIn() }, .{ .seconds = t.layout, .ease = canim.ease.enter });
+ s.play(.{under.fadeIn()}, .{ .seconds = t.move });
+ s.wait(t.beat);
+ s.play(.{marks.fadeIn()}, .{ .seconds = t.travel });
+ s.wait(4);
+}