//! 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 = "Six 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 = "fib, a list, a sort, hello, malloc and SQLite: 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 }); // Twelve marks to learn: long enough to read them all. s.wait(10); }