Expand description
Built-in scenes and the thin trait the renderer cycles through.
Per ADR-0002 this stays crate-internal and minimal: it is the vocabulary the future preset engine will drive, not a public extension point — no plugin registration, no dynamic dispatch beyond what cycling needs.
Modules§
- emitter
- Emitter scene: objects that spawn, follow an analytic ballistic path, age, and are retired — the first scene in the engine whose population is not fixed (ADR-0057).
- fragment_
field - Fragment-field scene: a fullscreen Shadertoy-style domain-warped field, colored through the shared palette LUT (ADR-0021). The first “generative-art”- tier built-in and one of the two preset-driven systems (ADR-0002 layers 1-2).
- lines
- Line-geometry scenes (ADR-0007): a line-art category built on one shared
LineRenderer(segments -> thick glowing instanced quads) and two build models over it — a cheap parametric system sampled every frame (the Maurer rose) and, from Phase 3, an expensive generator system built and cached at preset load. Ported in spirit from the user’s Maurer rose, L-system, and Islamic-star sketches; none of that JavaScript is reused, only the math. - particles
- GPU compute-particle scenes: strange attractors (ADR-0015, Plan 0016). The
engine’s first compute pipeline — a storage buffer of particles stepped
through an attractor map each frame by a compute shader, then drawn as
additive point-sprites with fading trails. This is idiom B of the four render
idioms; the CPU
swarmis idiom B’s ~10k CPU precursor, replaced here by GPU-resident state that scales to 100k+ points with no CPU round-trip. - reaction_
diffusion - Reaction-diffusion scene: a Gray-Scott simulation evolving on a fixed
internal grid via the reusable
PingPongField(ADR-0012). The engine’s first stateful scene — each frame’s field depends on the previous frame’s, held in a texture and stepped by a simulation shader — unlocking the organic, restructuring look (nested contours, cellular tissue, a hatched maze) stateless scenes can’t produce. - shape_
collage - Flat opaque elements painted on their own paper (ADR-0123).
- shape_
field - The mark roster, drawn at frame scale as a distance field (ADR-0105, Plan 0091).
- swarm
- Particle-swarm scene: ~10k CPU-simulated particles drifting through a flow field, drawn as instanced additive sprites (the starfield’s approach, scaled up). One of the two preset-driven systems (ADR-0002 layers 1-2).
- warp_
mesh - Warp mesh: a per-vertex UV grid that resamples the previous frame (ADR-0113).
Structs§
- CapOverflow
- Reported when building a line scene’s geometry hit the segment cap and
truncated. The cap must never be a silent cut (ADR-0007 Risks), so it travels
to the frontend two ways: out of
Scene::configureat preset load, and offScene::mirror_overflowfor the per-frame mirror.Noneis the normal case where geometry fit. - Param
Spec - What one named parameter is, as the engine declares it (ADR-0170).
Enums§
- Generator
Config - Declarative structural config a scene consumes once at preset load
(ADR-0007): not expressions — the family / grammar / tiling the sampler
or generator builds from. Delivered through the optional
Scene::configurehook, off the hot path. This is the shared structural-config enum for every scene that has one: the line scenes’ curve/L-system/star variants, plus the compute-particle attractor family (Plan 0016) — it lives here rather than inlines/solinesnever has to name aparticlestype (Plan 0031 Phase 6). - Overflow
Context - Which construction hit the segment cap, for the surfaced message.
- Param
Kind - What a parameter is for (ADR-0180 rule 2): whether its value carries an integer meaning, which decides two things and nothing else — whether the engine quantizes it before the scene sees it, and which of the generated reference’s two groups it prints under.
Functions§
- declares
- Whether
nameis declared inspecs. The load-time membership test. - default_
of - The default
nameis declared with, resolved at compile time. - kind_of
- The
ParamKindnameis declared with inspecs, orNonewhere no spec here declares it. - spec_
names - The names in a spec roster, for the places that still want
&[&str].