make examples compile, code that accessed window & graphics via the callback is currently disabled, until that is added back in
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user