diff options
| author | rezural <rezural@protonmail.com> | 2020-12-31 13:24:29 +1100 |
|---|---|---|
| committer | rezural <rezural@protonmail.com> | 2020-12-31 13:24:29 +1100 |
| commit | f7820139471178fd273c7698eba17cb4ee0cf00d (patch) | |
| tree | 8bcba52a9b7cea7e7abdd78c061e514df3b71c28 /examples3d/debug_dynamic_collider_add3.rs | |
| parent | d992ebc4885737511d9b5fafd1846e7601963e55 (diff) | |
| download | rapier-f7820139471178fd273c7698eba17cb4ee0cf00d.tar.gz rapier-f7820139471178fd273c7698eba17cb4ee0cf00d.tar.bz2 rapier-f7820139471178fd273c7698eba17cb4ee0cf00d.zip | |
make examples compile, code that accessed window & graphics via the callback is currently disabled, until that is added back in
Diffstat (limited to 'examples3d/debug_dynamic_collider_add3.rs')
| -rw-r--r-- | examples3d/debug_dynamic_collider_add3.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples3d/debug_dynamic_collider_add3.rs b/examples3d/debug_dynamic_collider_add3.rs index a71e95e..da33494 100644 --- a/examples3d/debug_dynamic_collider_add3.rs +++ b/examples3d/debug_dynamic_collider_add3.rs @@ -45,7 +45,7 @@ pub fn init_world(testbed: &mut Testbed) { let mut extra_colliders = Vec::new(); let snapped_frame = 51; - testbed.add_callback(move |window, physics, _, graphics, _| { + testbed.harness_mut().add_callback(move |physics, _, _, _| { step += 1; // Add a bigger ball collider @@ -56,7 +56,8 @@ pub fn init_world(testbed: &mut Testbed) { physics .colliders .insert(collider, ball_handle, &mut physics.bodies); - graphics.add_collider(window, new_ball_collider_handle, &physics.colliders); + // TODO: need a way to access graphics & window + // graphics.add_collider(window, new_ball_collider_handle, &physics.colliders); extra_colliders.push(new_ball_collider_handle); // Snap the ball velocity or restore it. @@ -95,7 +96,9 @@ pub fn init_world(testbed: &mut Testbed) { physics .colliders .insert(coll, ground_handle, &mut physics.bodies); - graphics.add_collider(window, new_ground_collider_handle, &physics.colliders); + + // TODO: need a way to access graphics & window + // graphics.add_collider(window, new_ground_collider_handle, &physics.colliders); extra_colliders.push(new_ground_collider_handle); }); |
