pub fn mount_controls(world: &mut World)Expand description
Mount the panel: one entity carrying the source that runs it.
The panel reads its input from the gameplay world’s own buffer, which the world subscribes when it is set up and dispatches on its tick, so nothing input-related is spawned here: the events the panel reacts to are the ones the rest of this world saw on the same tick.
The background loop starts once the audio world’s output is up — with the
scene, or on the user’s first click where the output waits for one; the
one-shot sequence waits for its row’s Play button and plays once per
press, and pressing it is also what unlocks a locked output. Each track then pauses, resumes and rewinds on its own, and the
balls drop or clear without touching the music. A scene with no
synthesizer has no SceneTracks and nothing to transport, so its panel
shows the balls alone.
The panel owns no state: a row reads the sequence it draws, and pressing a button writes it. egui may run a panel more than once in a frame, and every write here is one a second run repeats harmlessly.