Replace Kiss3d by Bevy for the testbed renderer.

This commit is contained in:
Crozet Sébastien
2021-05-16 17:49:20 +02:00
parent f350ac35d9
commit 1a84bf2af3
88 changed files with 2327 additions and 3940 deletions

View File

@@ -24,16 +24,16 @@ pub fn init_world(testbed: &mut Testbed) {
Point3::new(-width, -width, width),
];
let idx = vec![
[0, 1, 2],
[0, 2, 3],
[0, 2, 1],
[0, 3, 2],
[4, 5, 6],
[4, 6, 7],
[0, 4, 7],
[0, 7, 3],
[1, 5, 6],
[1, 6, 2],
[3, 2, 7],
[2, 6, 7],
[1, 6, 5],
[1, 2, 6],
[3, 7, 2],
[2, 7, 6],
[0, 1, 5],
[0, 5, 4],
];
@@ -54,6 +54,7 @@ pub fn init_world(testbed: &mut Testbed) {
let handle = bodies.insert(rigid_body);
let collider = ColliderBuilder::trimesh(vtx, idx).build();
colliders.insert(collider, handle, &mut bodies);
testbed.set_initial_body_color(handle, Point3::new(0.3, 0.3, 0.3));
/*
* Set up the testbed.
@@ -61,8 +62,3 @@ pub fn init_world(testbed: &mut Testbed) {
testbed.set_world(bodies, colliders, joints);
testbed.look_at(Point3::new(10.0, 10.0, 10.0), Point3::origin());
}
fn main() {
let testbed = Testbed::from_builders(0, vec![("Boxes", init_world)]);
testbed.run()
}