feat: migrate to glam whenever relevant + migrate testbed to kiss3d instead of bevy + release v0.32.0 (#909)
* feat: migrate to glam whenever relevant + migrate testbed to kiss3d instead of bevy * chore: update changelog * Fix warnings and tests * Release v0.32.0
This commit is contained in:
@@ -15,7 +15,7 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
/*
|
||||
* Ground
|
||||
*/
|
||||
let rigid_body = RigidBodyBuilder::fixed().translation(vector![0.0, -2.0]);
|
||||
let rigid_body = RigidBodyBuilder::fixed().translation(Vector::new(0.0, -2.0));
|
||||
let ground_handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::cuboid(40.0, 2.0).friction(friction);
|
||||
colliders.insert_with_parent(collider, ground_handle, &mut bodies);
|
||||
@@ -42,14 +42,17 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
for i in 0..nb {
|
||||
if i != nb - 1 {
|
||||
let rigid_body = RigidBodyBuilder::dynamic()
|
||||
.translation(vector![z + 0.25 * scale, y + card_height - 0.015 * scale])
|
||||
.translation(Vector::new(
|
||||
z + 0.25 * scale,
|
||||
y + card_height - 0.015 * scale,
|
||||
))
|
||||
.rotation(angle2);
|
||||
let ground_handle = bodies.insert(rigid_body);
|
||||
colliders.insert_with_parent(card_box.clone(), ground_handle, &mut bodies);
|
||||
}
|
||||
|
||||
let rigid_body = RigidBodyBuilder::dynamic()
|
||||
.translation(vector![z, y])
|
||||
.translation(Vector::new(z, y))
|
||||
.rotation(angle1);
|
||||
let ground_handle = bodies.insert(rigid_body);
|
||||
colliders.insert_with_parent(card_box.clone(), ground_handle, &mut bodies);
|
||||
@@ -57,7 +60,7 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
z += 0.175 * scale;
|
||||
|
||||
let rigid_body = RigidBodyBuilder::dynamic()
|
||||
.translation(vector![z, y])
|
||||
.translation(Vector::new(z, y))
|
||||
.rotation(angle0);
|
||||
let ground_handle = bodies.insert(rigid_body);
|
||||
colliders.insert_with_parent(card_box.clone(), ground_handle, &mut bodies);
|
||||
@@ -74,5 +77,5 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
* Set up the testbed.
|
||||
*/
|
||||
testbed.set_world(bodies, colliders, impulse_joints, multibody_joints);
|
||||
testbed.look_at(point![0.0, 2.5], 20.0);
|
||||
testbed.look_at(Vec2::new(0.0, 2.5), 20.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user