Expand description
TOML preset schema: which built-in system a preset drives and the expression bound to each of its named parameters.
Parsing happens once at load: the raw TOML is deserialized, each parameter
expression is compiled (a malformed one is rejected with a surfaced error),
and the result is an in-memory Preset whose bindings are ready to
evaluate. A bad preset returns Err — it never panics, so the caller can
degrade to the last good preset (ADR-0002 / NFR 10).
Re-exports§
Modules§
- export
- What a preset may contain, as a machine-readable document (Plan 0158 Phase 4).
Structs§
- Binding
- A named parameter bound to a compiled expression.
- Easing
- A binding’s easing time constants in seconds (ADR-0019, widened to a pair by ADR-0035).
- Latch
- One
[latch]entry, compiled (ADR-0137): a gate armed on one condition and fired by the first rising edge of another inside the arming window. - Layer
- The optional second scene layer (ADR-0090 / Plan 0076): a full authoring
surface — its own system, params, bindings,
[layer.smoothing]and structural tables — joined to the composite atLayerJoin. The preset’s single[palette]serves both layers (one colour language, one baked LUT), and layer params are namespaced to the layer: they reach the layer’s scene only, never the main scene’s first-owner-wins routing and never the compositing stages, which belong to the preset as a whole. - Preset
- A loaded, ready-to-evaluate preset.
Enums§
- Hold
Edge - When a held binding takes a new value (ADR-0180 rule 2). Between edges the scene keeps reading the value taken at the last one.
- Layer
Blend - How an
overlayer blends into the chain (ADR-0090): fixed at load, like every structural key, and applied in linear light within the layer’s premultiplied-alpha footprint. Parsed now; consumed by the blend pass (Plan 0076 Phase 3). - Layer
Join - Where a preset’s second scene joins the composite (ADR-0090): before the post chain, sharing every stage with the main scene, or between the kaleidoscope and bloom in its own offscreen (Phase 3).
- Preset
Error - Why a preset failed to load. Every variant is recoverable — the caller keeps the previous good preset.
- System
Kind - The built-in system a preset drives. Extend as Plan 0003 (and later plans) add systems; unknown names are rejected at load.
Constants§
- GLOBAL_
PARAMS - The parameter names any preset may bind regardless of its system: the five
compositing stages that run around the scene (
bg_*,trails,kaleido_*,exposure,ink_*/paper_*). Gathered from each stage’s own declared vocabulary so there is no third copy to drift.
Functions§
- is_
known_ param - Whether
nameis a parametersystem(or the global compositing layer) actually consumes. An unknown name is a load-time warning, not an error: the preset still loads and applies its good bindings (ADR-0020, NFR 10). - kind_
of_ param - The
ParamKindnameis declared with, searchingsystem’s own roster first and then the global compositing stages — the same rosters in the same orderis_known_paramtests, so a name that is known there has a kind here.