1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//!
//! # Crate API
//!
//! `broadsheet` is organized around a small, scriptable pipeline:
//!
//! 1. Build a [`movie::Movie`] with a base scene.
//! 2. Declare visual entities with [`scene::SceneBuilder`].
//! 3. Add animation clips with [`animate::act`], [`seq!`], [`par!`], and
//! [`stagger!`].
//! 4. Hand the movie to [`run`] for live preview or deterministic recording.
//!
//! The easiest entry point is [`prelude`], which re-exports the types and
//! helpers used by movie scripts.
//!
//! ## Minimal Example
//!
//! ```ignore
//! use broadsheet::prelude::*;
//!
//! fn main() {
//! let mut m = Movie::new("Hello", 1280, 720);
//! m.scene()
//! .circle("A", v(300., 400.), 40.).label("A")
//! .circle("B", v(900., 400.), 40.).label("B");
//! m.play(seq![
//! act().move_to("A", v(900., 500.)).dur(0.6).ease(InOutCubic),
//! act().highlight("B", ACCENT),
//! wait(0.5),
//! ]);
//! broadsheet::run(m);
//! }
//! ```
//!
//! ## Core Concepts
//!
//! - [`movie::Movie`] stores the base scene, timeline clips, section jumps, and
//! beat marks.
//! - [`scene`] owns entity declaration: circles, rectangles, lines, arrows,
//! text, cells, code blocks, labels, tags, and follow relationships.
//! - [`animate`] provides the fluent verb DSL: move, fade, highlight, pulse,
//! trace, type, retarget, and camera moves.
//! - [`timeline`] resolves clips into absolute tracks. Its evaluation is a pure
//! function of time, so pause, scrub, frame stepping, and offline recording
//! are deterministic.
//! - [`render`] turns a scene snapshot into macroquad draw calls with the
//! built-in broadsheet style from [`style`].
//! - [`layout`] contains small coordinate helpers for rows, grids, trees, and
//! rings.
//!
//! ## Recording
//!
//! Run live with `cargo run --example NAME`, or record with:
//!
//! ```sh
//! cargo run --example NAME -- --record out/name --fps 60
//! ```
//!
//! Useful recording flags include `--still S`, `--from S --to S`, `--alpha`,
//! `--gif`, `--png`, `--grain`, `--scale F`, and `--frames N`.
use Vec2;
/// Shorthand position constructor: `v(100., 200.)`.
/// Open a window and run the movie (live preview, or `--record` offline).
///
/// Call this from a plain `fn main()` — no macroquad attribute needed.
/// Everything a movie script needs: `use broadsheet::prelude::*;`