Expand description
The headless run: the whole scene, stepped inline without a window, threads or audio output.
The windowed mode spreads the worlds across threads: a render sub-world on the main thread, remote physics, audio and gameplay worlds on their own threads. The headless run keeps the same worlds and the same job and snapshot plumbing, but every world lives in one place and the run drives them in a fixed order: gameplay ticks, physics drains its jobs and steps, the synthesizer renders the tracks, then the render world drains its commands and draws. With every world stepped at a fixed rate, a run is reproducible down to the captured frames and audio samples.
Re-exportsΒ§
use std::sync::Arc;πuse unlit_wgpu::readback::readback_texture;πuse unlit3d::frame::Frame;πuse unlit3d::frame::dispatch_frame;πuse crate::scene::AudioSetup;πuse crate::scene::HEADLESS_HZ;πuse crate::scene::PanelSlots;πuse crate::scene::SceneStepper;πuse crate::scene::mount_scene_content;πuse crate::scene::setup_render_world;πuse crate::scene::spawn_scene;πuse unlit3d::prelude::*;πuse unlit3dx::prelude::*;π
StructsΒ§
- Headless
Config - The headless runβs settings.
- Headless
Output - What one headless run produced.
ConstantsΒ§
- AUDIO_
CHANNELS - How many channels the headless run mixes: the interleaved samples the audio worldβs fill dispatch writes, and the stream the encoder reads.
- AUDIO_
SAMPLE_ RATE - The audio sample rate the headless run renders at, in hertz.
FunctionsΒ§
- run
- Run the scene headless and answer the captured frames and audio.