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:
rezural
2020-12-31 13:24:29 +11:00
parent d992ebc488
commit f782013947
9 changed files with 36 additions and 20 deletions

View File

@@ -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);
});