Skip to main content

Module interactive

Module interactive 

Source
Expand description

The interactive run, stepped inline: the wasm page drives this module. The interactive run: the whole scene, stepped inline and driven by input.

The windowed mode runs the same scene across threads, paced by the display. This run keeps every world stepped on one thread and advances it one frame at a time, so a caller reproduces exactly what it drove: the wasm test that clicks buttons and reads frames back, or a native one that does the same without a process boundary. The GPU is injected, the way the headless run takes one, so a test asks for a headless device and a windowed caller builds its own from the surface.

Re-exportsΒ§

use std::sync::Arc; πŸ”’
use unlit_ecs::Entity; πŸ”’
use unlit_ecs::World; πŸ”’
use unlit_ecs::bundle; πŸ”’
use unlit_wgpu::resources::ResHandle; πŸ”’
use unlit3d::frame::Frame; πŸ”’
use unlit3d::frame::dispatch_frame; πŸ”’
use unlit3d::input::InputEvent; πŸ”’
use unlit3d::input::InputWriter; πŸ”’
use unlit3d::input::dispatch_input; πŸ”’
use crate::headless::AUDIO_CHANNELS; πŸ”’
use crate::headless::AUDIO_SAMPLE_RATE; πŸ”’
use crate::scene::AudioSetup; πŸ”’
use crate::scene::Ball; πŸ”’
use crate::scene::HEADLESS_HZ; πŸ”’
use crate::scene::PanelLayout; πŸ”’
use crate::scene::PanelSlots; πŸ”’
use crate::scene::SceneHandles; πŸ”’
use crate::scene::SceneStepper; πŸ”’
use crate::scene::SceneTracks; πŸ”’
use crate::scene::Track; πŸ”’
use crate::scene::WINDOW_SIZE; πŸ”’
use crate::scene::mount_scene_content; πŸ”’
use crate::scene::setup_render_world; πŸ”’
use crate::scene::spawn_scene; πŸ”’
use unlit3d::prelude::*; πŸ”’
use unlit3dx::prelude::*; πŸ”’

StructsΒ§

Interactive
An interactive scene stepping inline: one frame per call, no pacing of its own.
InteractiveConfig
The settings one interactive run builds with.
Recording
A finished recording: the format it captured at, and the samples it held.
SceneStatus
The scene state a caller asserts on: the balls and the sequence.

FunctionsΒ§

run
Build the interactive scene: an input writer on the host, the scene’s worlds, an offscreen render target and the stepping interactive.
scene_status
Report the scene state: the balls the gameplay world holds and where its MIDI sequence stands.