Skip to main content

clairlune_scene/
lib.rs

1//! Deterministic scene generation for Clairlune.
2//!
3//! `seed -> SceneRecipe -> SceneGraph`. This crate is pure: no OS calls, no I/O,
4//! no clocks. The same inputs give byte-identical outputs on every platform, which
5//! is why it uses its own stable hashing, ChaCha8 as a raw bit source with
6//! hand-written integer sampling, and `libm` for transcendental functions.
7
8/// Compiles the README example as a doctest so it can't go stale.
9#[cfg(doctest)]
10#[doc = include_str!("../README.md")]
11struct ReadmeDoctests;
12
13pub mod activity;
14pub mod anim;
15pub mod archetype;
16pub mod build;
17pub mod compose;
18pub mod focal;
19pub mod glyphs;
20pub mod graph;
21pub mod hash;
22pub mod ident;
23pub mod math;
24pub mod noise;
25pub mod palette;
26pub mod particles;
27pub mod placeholder;
28pub mod recipe;
29pub mod rng;
30
31pub use activity::{Activity, Catalog};
32pub use build::{BuildError, BuildOptions, build};
33pub use compose::compose;
34pub use graph::{
35    Cell, CharacterTrack, GridSpec, Lighting, Motion, SceneGraph, SpriteInstance, SpriteKind,
36    grid_spec,
37};
38pub use ident::{APP_ID, APP_NAME};
39pub use palette::{PaletteFamily, Rgb, Theme};
40pub use recipe::{Aspect, ContentContext, GENERATOR_VERSION, SceneRecipe, TimeOfDay};