From f7820139471178fd273c7698eba17cb4ee0cf00d Mon Sep 17 00:00:00 2001 From: rezural Date: Thu, 31 Dec 2020 13:24:29 +1100 Subject: make examples compile, code that accessed window & graphics via the callback is currently disabled, until that is added back in --- examples3d/debug_dynamic_collider_add3.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples3d/debug_dynamic_collider_add3.rs') 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); }); -- cgit