Add nalgebra to the prelude to make the macros work out of the box

This commit is contained in:
Crozet Sébastien
2021-06-03 09:57:56 +02:00
committed by Sébastien Crozet
parent fdd370e51a
commit 59e5d8e7f9
18 changed files with 9 additions and 22 deletions

View File

@@ -16,7 +16,6 @@ enhanced-determinism = [ "rapier3d/enhanced-determinism" ]
rand = "0.8"
getrandom = { version = "0.2", features = [ "js" ] }
Inflector = "0.11"
nalgebra = "0.27"
wasm-bindgen = "0.2"
obj-rs = { version = "0.6", default-features = false }

View File

@@ -1,7 +1,5 @@
#![allow(dead_code)]
extern crate nalgebra as na;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;

View File

@@ -1,7 +1,5 @@
#![allow(dead_code)]
extern crate nalgebra as na;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;

View File

@@ -40,7 +40,7 @@ pub fn init_world(testbed: &mut Testbed) {
let shift = 5.0f32;
for (igeom, obj_path) in geoms.into_iter().enumerate() {
let deltas = na::one();
let deltas = Isometry::identity();
let mut shapes = Vec::new();
println!("Parsing and decomposing: {}", obj_path);

View File

@@ -1,4 +1,4 @@
use na::ComplexField;
use rapier3d::na::ComplexField;
use rapier3d::prelude::*;
use rapier_testbed3d::Testbed;

View File

@@ -1,4 +1,4 @@
use na::ComplexField;
use rapier3d::na::ComplexField;
use rapier3d::prelude::*;
use rapier_testbed3d::Testbed;