feat(rapier_testbed): autosave testbed configuration + add support for per-example settings (#799)

* feat(rapier_testbed): autosave testbed configuration + add support for per-example parameters

* feat(rapier_testbed): also save the camera position

* feat(rapier_testbed): improve ergonomics of example-specific settings

* chore: cargo fmt

* chore(rapier_testbed): small UI ergonomics improvement

* chore(rapier_testbed): clippy fixes
This commit is contained in:
Sébastien Crozet
2025-02-21 17:52:46 +01:00
committed by GitHub
parent bf8e48e920
commit 5ca6ae9106
23 changed files with 358 additions and 195 deletions

View File

@@ -21,7 +21,9 @@ pub fn init_world(testbed: &mut Testbed) {
/*
* Create the cubes
*/
let base_count = 100;
const BASE_COUNT_SETTING: &str = "# of basis cubes";
let settings = testbed.example_settings_mut();
let base_count = settings.get_or_set_u32(BASE_COUNT_SETTING, 100, 2..=200);
let h = 0.5;
let shift = 1.0 * h;