diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/anim/player.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/anim/player.zig b/src/anim/player.zig index bac5178..090b6cb 100644 --- a/src/anim/player.zig +++ b/src/anim/player.zig @@ -26,6 +26,8 @@ const typst = @import("typst"); const geom = vector.geom; pub const name = if (@hasDecl(scene_file, "name")) scene_file.name else "anim"; +/// The page: the scene file's `background` (0xRRGGBB), or manim's. +const background: u32 = if (@hasDecl(scene_file, "background")) scene_file.background else anim.background; /// The scene's frame, in scene units: what shows at camera zoom 1. pub const width = 1280; pub const height = 720; @@ -234,7 +236,7 @@ fn paint(s: *const State, ss: *Session, layers: anytype, f: *sk.Frame, shot: ani const world = stage(s, shot.camera, canvas); var used: usize = 0; // The first layer is the background too. - var open: ?*@TypeOf(layers.items[0]) = try begun(layers, &used, f, canvas, anim.color(anim.background)); + var open: ?*@TypeOf(layers.items[0]) = try begun(layers, &used, f, canvas, anim.color(background)); var shapes: usize = 0; for (shot.objects, shot.poses, 0..) |o, pose, i| { if (!pose.visible or pose.opacity <= 0) continue; |
