Skip to main content

Module voice_wave

Module voice_wave 

Source
Expand description

NEW-77: the VoiceWave rings (catalog/style.json voiceWave), a port of src/voice-wave.ts; fixtures/voice-wave.json locks it. A painter fills and strokes each ring’s closed path with its part colour (outer, mid, inner) at the ring’s alphas and centres the child at child_size.

Structs§

ChildBox
Where a painter draws the child: its own box scaled about the wave’s centre by scale = min(1, child_size / its longer edge), never up; 0 = kept in the tree but not painted (sm).
ChildSize
VoiceWave
VoiceWaveBar
VoiceWaveBars
One frame of the meter: the root box (count × barWidth + (count − 1) × gap wide, height tall), the phase and every bar rect (px from the box’s top-left), filled with the bar part colour.
VoiceWaveBarsInput
The input of voice_wave_bars: size = the size CLASS (sm md lg xl; anything else is md).
VoiceWaveBarsSize
VoiceWaveBarsSpec
VoiceWaveInput
VoiceWaveRing
VoiceWaveSpec

Enums§

Activity
The activity prop (catalog enum voiceWaveActivity). Deserialized through Activity::parse: every value the catalog does not name (a bound string, a typo) is Idle, the TS reference’s fallback, so no FFI consumer gets {}.
Variant
The variant prop (catalog enum): anything but bars is ring.

Constants§

RINGS
The ring parts, outermost first.

Statics§

VOICE_WAVE
VOICE_WAVE_BARS

Functions§

child_box
The child’s painted box in a wave of edge size (see ChildBox).
child_size
The child’s edge for a box size (sm 32 · md 56 · lg 160 · xl 200).
phase
The phase (radians) a painter draws at elapsed seconds.
voice_wave
The three rings for one frame (coordinates rounded to 0.01 px).
voice_wave_bars
The bars for one frame (style.json voiceWave.bars $comment).
voice_wave_bars_box
The box of a bars meter for a size class: (width, height, bar width, gap).