1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//! 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 = "Four 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 });
// Ten marks to learn: long enough to read them all.
s.wait(8);
}
|