Expand description
Rendering for Clairlune: glyph atlas, indexed palette, static bake, frame compositing and PNG export.
Every pixel is a palette index. Colours are looked up, never blended at render time, so a scene has at most 255 colours (index 255 is reserved for GIF transparency) and the still PNG, GIF frames and the live renderer can match exactly (PLAN.md section 4.5).
Re-exports§
pub use atlas::GlyphAtlas;pub use bake::bake_static;pub use encode::encode_png;pub use encode::save_png;pub use encode::to_rgba;pub use frame::render_frame;pub use palette::IndexedPalette;
Modules§
- atlas
- Glyph atlas: every glyph of
glyphs::GLYPHSrasterized once into a cell-sized alpha mask. - bake
- Static bake: background bands plus every glyph cell, rendered once per scene.
- encode
- PNG export. Scenes have at most 255 colours, so stills are written as indexed (paletted) PNGs, which are much smaller than RGBA.
- frame
- Frame compositing: the baked background plus animated elements at time
t. Particles snap to the cell grid (exact palette, small GIF diffs); sprites use integer nearest-neighbour scaling. - palette
- The indexed palette of one rendering (at most 255 colours).
Structs§
- Indexed
Image - An image of palette indices, row-major.
- Still
- A rendered still frame with everything needed to encode or inspect it.
Functions§
- render_
still - Renders a recipe to a still frame at
t_ms, or at the hero time whenNone.