Skip to main content

Module scenes

Module scenes 

Source
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 swarm is 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::configure at preset load, and off Scene::mirror_overflow for the per-frame mirror. None is the normal case where geometry fit.
ParamSpec
What one named parameter is, as the engine declares it (ADR-0170).

Enums§

GeneratorConfig
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::configure hook, 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 in lines/ so lines never has to name a particles type (Plan 0031 Phase 6).
OverflowContext
Which construction hit the segment cap, for the surfaced message.
ParamKind
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 name is declared in specs. The load-time membership test.
default_of
The default name is declared with, resolved at compile time.
kind_of
The ParamKind name is declared with in specs, or None where no spec here declares it.
spec_names
The names in a spec roster, for the places that still want &[&str].