pub struct MilkElement {
pub init: EelProgram,
pub per_frame: EelProgram,
pub per_point: EelProgram,
pub count: u32,
pub instances: u32,
pub kind: ElementKind,
pub use_dots: bool,
pub thick: bool,
pub additive: bool,
}Expand description
One custom wave or shape: its three programs and the structural numbers that size its geometry.
The look numbers — position, colour, radius, alpha — are not here: they
are outputs the element’s own per-frame program leaves in named registers,
seeded from the file’s initial conditions by a prologue the converter emits.
That is the same shape the main bundle takes, and it is what keeps this struct
from being forty fields of .milk key.
Fields§
§init: EelProgramRun once, at preset load.
per_frame: EelProgramRun once per frame — and once per instance for a shape, with
instance bound.
per_point: EelProgramRun once per point. Empty for a shape.
count: u32Points (a wave) or sides (a shape).
instances: u32How many copies a shape draws. Always 1 for a wave.
kind: ElementKindWhich it is.
use_dots: boolPast 0.5, a wave draws dots rather than a line.
thick: boolPast 0.5, a wave’s line or a shape’s outline is drawn thick.
additive: boolPast 0.5, a wave adds rather than blends. See ElementSpec::additive
for why a shape’s flag is not here.
Trait Implementations§
Source§impl Clone for MilkElement
impl Clone for MilkElement
Source§fn clone(&self) -> MilkElement
fn clone(&self) -> MilkElement
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 MilkElement
impl Debug for MilkElement
Source§impl PartialEq for MilkElement
impl PartialEq for MilkElement
Source§fn eq(&self, other: &MilkElement) -> bool
fn eq(&self, other: &MilkElement) -> bool
self and other values to be equal, and is used by ==.