From ff2da7fb27f0ea7a15b1dc6b6daf763fe7faf13b Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 6 Sep 2020 12:16:09 +0200 Subject: Move benchmark demos into their own directory. --- examples2d/joints2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples2d/joints2.rs') diff --git a/examples2d/joints2.rs b/examples2d/joints2.rs index c3df921..888c48b 100644 --- a/examples2d/joints2.rs +++ b/examples2d/joints2.rs @@ -40,7 +40,7 @@ pub fn init_world(testbed: &mut Testbed) { .translation(fk * shift, -fi * shift) .build(); let child_handle = bodies.insert(rigid_body); - let collider = ColliderBuilder::ball(rad).density(1.0).build(); + let collider = ColliderBuilder::ball(rad).build(); colliders.insert(collider, child_handle, &mut bodies); // Vertical joint. -- cgit From e7466e2f6923d24e987a34f8ebaf839346af8d4e Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 28 Sep 2020 10:19:49 +0200 Subject: Move 2D benchmarks into their own directory/crate. --- examples2d/joints2.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples2d/joints2.rs') diff --git a/examples2d/joints2.rs b/examples2d/joints2.rs index 888c48b..d1a1942 100644 --- a/examples2d/joints2.rs +++ b/examples2d/joints2.rs @@ -19,8 +19,8 @@ pub fn init_world(testbed: &mut Testbed) { // in order to be able to compare rapier with Box2D, // we set it to 0.4. let rad = 0.4; - let numi = 100; // Num vertical nodes. - let numk = 100; // Num horizontal nodes. + let numi = 10; // Num vertical nodes. + let numk = 10; // Num horizontal nodes. let shift = 1.0; let mut body_handles = Vec::new(); @@ -30,7 +30,7 @@ pub fn init_world(testbed: &mut Testbed) { let fk = k as f32; let fi = i as f32; - let status = if i == 0 && (k % 4 == 0 || k == numk - 1) { + let status = if i == 0 && k == 0 { BodyStatus::Static } else { BodyStatus::Dynamic @@ -66,7 +66,7 @@ pub fn init_world(testbed: &mut Testbed) { * Set up the testbed. */ testbed.set_world(bodies, colliders, joints); - testbed.look_at(Point2::new(numk as f32 * rad, numi as f32 * -rad), 5.0); + testbed.look_at(Point2::new(numk as f32 * rad, numi as f32 * -rad), 20.0); } fn main() { -- cgit