pub struct ShapeInstance {Show 19 fields
pub x: f32,
pub y: f32,
pub rad: f32,
pub ang: f32,
pub r: f32,
pub g: f32,
pub b: f32,
pub a: f32,
pub r2: f32,
pub g2: f32,
pub b2: f32,
pub a2: f32,
pub border_r: f32,
pub border_g: f32,
pub border_b: f32,
pub border_a: f32,
pub thick_outline: f32,
pub sides: f32,
pub additive: f32,
}Expand description
The values a program left in its output registers this frame, already converted out of MilkDrop’s per-frame vocabulary where that applies.
Default is MilkDrop’s own default for each, which is what the host
seeds before running a program — so an output the preset never writes
comes back as the reference’s resting value rather than as zero.
It is therefore unconverted, in the reference’s vocabulary, and is
not interchangeable with a value read returns. Anything comparing
the two must convert first.
Fields§
§x: f32The shape’s centre, in uv with y = 0 at the top.
y: f32See x.
rad: f32The shape’s radius, in frame-heights.
ang: f32The shape’s rotation, in radians.
r: f32The centre colour.
g: f32See r.
b: f32See r.
a: f32The centre alpha, read as intensity.
r2: f32The edge colour, which the fill ramps toward.
g2: f32See r2.
b2: f32See r2.
a2: f32The edge alpha.
border_r: f32The outline’s colour.
border_g: f32See border_r.
border_b: f32See border_r.
border_a: f32The outline’s alpha. 0 draws no outline.
thick_outline: f32Past 0.5, the outline is drawn thick.
sides: f32How many sides this instance has, overriding the structural count.
additive: f32Past 0.5, this instance adds rather than blends. Per instance rather
than per element, because a shape’s per-frame program may write it — see
warp_mesh::draw::Exposure.
Trait Implementations§
Source§impl Clone for ShapeInstance
impl Clone for ShapeInstance
Source§fn clone(&self) -> ShapeInstance
fn clone(&self) -> ShapeInstance
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 ShapeInstance
impl Debug for ShapeInstance
Source§impl Default for ShapeInstance
impl Default for ShapeInstance
Source§impl PartialEq for ShapeInstance
impl PartialEq for ShapeInstance
Source§fn eq(&self, other: &ShapeInstance) -> bool
fn eq(&self, other: &ShapeInstance) -> bool
self and other values to be equal, and is used by ==.