pub struct Rabbit {}Expand description
Parametric knobs for the rabbit silhouette. All in the normalised [-1, 1]
design box (y up). Rabbit::default is the tuned mascot; tests and
renderers should use it so the geometry is the same everywhere.
Fields§
§body_cy: f64Body ellipse centre + radii (the sitting haunch).
body_rx: f64§body_ry: f64§head_cx: f64Head circle centre + radius (sits above/forward of the body).
head_cy: f64§head_r: f64§ear_w: f64Ear geometry: half-width at the base, length, lean (x-offset of the tip), and the gap between the two ear centres at the head.
ear_len: f64§ear_lean: f64§ear_gap: f64§eye_dx: f64Eye dot centre (offset from the head centre) + radius.
eye_dy: f64§eye_r: f64§segments: usizeHow many segments to sample each rounded part with (even → symmetric).
Implementations§
Source§impl Rabbit
impl Rabbit
Sourcepub fn outline(&self) -> Vec<Loop> ⓘ
pub fn outline(&self) -> Vec<Loop> ⓘ
The rabbit as closed polygon loops, outer silhouette first, then the
two ears, then the eye dot. Each loop is a CCW ring in the [-1, 1] box
(y up). The 2D renderer fills the body+head as the silhouette, fills the
ears on top, and punches the eye as a small dark dot.
Sourcepub fn silhouette(&self) -> Vec<Loop> ⓘ
pub fn silhouette(&self) -> Vec<Loop> ⓘ
The fillable body silhouette: just the body + head + ears (no eye), the loops a 2D renderer fills as the solid mascot. Returned outer→inner so the renderer can paint them in order (body, head, ears) with one colour.