Skip to main content

Module engine

Module engine 

Source
Expand description

Backend-agnostic animation engine (ported from thinking-orbs).

Structs§

Dot
A projected, depth-shaded disk.
Frame
Frame geometry produced by a mode painter (backend-agnostic).
Line
A stroked edge between two projected points (the connecting web).
ModeOpts
Free-form numeric knobs for mode painters (mirrors upstream ModeOpts).
Proj
Spin + tilt + orthographic projection, precomputed once per frame.

Constants§

MAX_ICON_D
MAX_MORPH_DOTS
Max dots the Morph painter will emit after icon_d is applied.
MAX_NODE_N
MAX_SIZE
MIN_SIZE
Logical size (px) accepted by crate::orbs::engine::draw_mode_into.

Functions§

base_profile
Base (fine) profiles per mode, before preset multipliers.
draw_mode
Paint one frame for the given mode into a fresh Frame.
draw_mode_into
Paint one frame for the given mode into an existing Frame, reusing its buffers.
make_proj
Shared spin + tilt + orthographic projection.
sanitize_mode_opts
Return a safe copy of opts with every count-like / radius-like knob finite and within the hard ceilings above.
sanitize_size
Clamp the logical paint size in pixels.
scale_counts
Scale total dot density. 2-D lattices (rings × dots-per-ring) take √scale each side so the TOTAL scales by scale. Flat lists scale linearly.
scale_radii
Scale every key that sets a dot’s rendered radius.
sort_dots
Z-sort far→near so nearer dots paint over farther ones.