pub enum SystemKind {
FragmentField,
Swarm,
ParametricCurve,
LSystem,
StarPattern,
ReactionDiffusion,
Attractor,
Spectrum,
ShapeField,
Emitter,
WarpMesh,
ShapeCollage,
}Expand description
The built-in system a preset drives. Extend as Plan 0003 (and later plans) add systems; unknown names are rejected at load.
Variants§
FragmentField
The fullscreen fragment-field scene.
Swarm
The CPU particle-swarm scene.
ParametricCurve
The parametric line-curve scene (Maurer rose, …) — ADR-0007.
LSystem
The L-system generator scene — ADR-0007.
StarPattern
The Hankin star-pattern generator scene — ADR-0007.
ReactionDiffusion
The Gray-Scott reaction-diffusion feedback scene — ADR-0012.
Attractor
The GPU compute-particle strange-attractor scene — ADR-0015.
Spectrum
The N-element spectrum readout — ADR-0036. A line scene like the three above (it draws through the same shared renderer), driven by the analysis frame’s log-spaced band array rather than by a generator.
ShapeField
The mark roster drawn at frame scale as a signed-distance field —
ADR-0105. The one scene whose palette coordinate is a distance,
which is what makes palette_steps draw concentric offset contours
of a shape.
Emitter
The ballistic emitter — objects that spawn, fall on a parabola and die (ADR-0057). The first scene whose population is not fixed.
WarpMesh
The warp mesh — a per-vertex UV grid that resamples the previous frame
(ADR-0113). Generalizes ADR-0048’s single shared feedback transform to
one transform per vertex, driven by a [per_vertex] table.
ShapeCollage
Flat opaque elements painted on their own paper, composited in painter order in one fullscreen distance-field pass (ADR-0123). The engine’s first graphic world rather than a luminous one: the only system in which one object is genuinely in front of another.
Implementations§
Source§impl SystemKind
impl SystemKind
Sourcepub const VARIANT_COUNT: usize = 12
pub const VARIANT_COUNT: usize = 12
How many variants SystemKind has. Kept honest by row: a new
variant fails the build there until it is rostered, and TABLE is
typed off this count, so bumping the count without adding a row does not
compile either. Both are module-private, so this names them rather than
linking them.
Sourcepub const ALL: [SystemKind; 12]
pub const ALL: [SystemKind; 12]
Every SystemKind, in the order the engine builds their scenes. The
scene factory (render::scenes::create_all) and the golden drift guard
both iterate this rather than keeping lists of their own.
Typed [SystemKind; VARIANT_COUNT], so a roster that has drifted from
the variant count is a compile error, not a test failure.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Parse a canonical system name (as written in a preset’s system = "..."
field) into its SystemKind, or None if unknown. The inverse of
SystemKind::as_str; the shot CLI reuses the pair so it declares no
match of its own.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The canonical name of this system – the exact string
SystemKind::from_name accepts and a preset writes in its system
field.
Sourcepub fn param_specs(self) -> &'static [ParamSpec]
pub fn param_specs(self) -> &'static [ParamSpec]
The parameters this system’s scene consumes, as the scene declares them
(the module-private TABLE).
The specs carry the default and the doc line as well as the name
(ADR-0170), which is what lets the generated reference in
presets/README.md be derived from the same declaration the loader
checks a binding against.
Sourcepub fn param_names(self) -> Vec<&'static str>
pub fn param_names(self) -> Vec<&'static str>
Just the names, for a caller that wants to print or join them.
Allocates. Use declares for a membership test, which is what almost
every caller actually wants.
Trait Implementations§
Source§impl Clone for SystemKind
impl Clone for SystemKind
Source§fn clone(&self) -> SystemKind
fn clone(&self) -> SystemKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemKind
impl Debug for SystemKind
Source§impl PartialEq for SystemKind
impl PartialEq for SystemKind
Source§fn eq(&self, other: &SystemKind) -> bool
fn eq(&self, other: &SystemKind) -> bool
self and other values to be equal, and is used by ==.impl Copy for SystemKind
impl Eq for SystemKind
impl StructuralPartialEq for SystemKind
Auto Trait Implementations§
impl Freeze for SystemKind
impl RefUnwindSafe for SystemKind
impl Send for SystemKind
impl Sync for SystemKind
impl Unpin for SystemKind
impl UnsafeUnpin for SystemKind
impl UnwindSafe for SystemKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.