fastsim.app
Primary entry point for loading configuration, building the scene, and running the simulation loop. FastSim wraps the full lifecycle: init → setup → reset → step/start → close.
FastSim
18 methodsMain application class that orchestrates config loading, simulation initialization, scene setup, and the step loop.
Instantiate with an optional config path, call setup_all_before_loop() for one-shot initialization, then drive the loop manually with step() or let start() / start_with_task() manage it. Use add_step_callback() to hook into each tick.
setup_all_before_loopmethodOne-shot initialization: initialize backend → enable extensions → build scene → reset.
Recommended way to prepare the simulation before entering a step loop. Equivalent to calling initialize_simulation(), enabling extensions, setting up the scene, and reset() in order.
add_controller_threadmethodRegister a controller function to be run in a dedicated thread.
start_with_taskmethodRun the configured task in a controller thread and optionally stop when it ends.
| Name | Type | Default | Description |
|---|---|---|---|
stop_sim_on_task_endopt | bool | True | If True, request_terminate() is called automatically when the task finishes. |
StepContext
2 methodsDataclass passed to step and terminate callbacks carrying per-tick metadata.