Skip to content

Commit

Permalink
feat: update testbeds to bevy 0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
sebcrozet committed Mar 24, 2024
1 parent f351dad commit 67701de
Show file tree
Hide file tree
Showing 12 changed files with 223 additions and 195 deletions.
50 changes: 25 additions & 25 deletions crates/rapier_testbed2d-f64/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "rapier_testbed2d-f64"
name = "rapier_testbed2d-f64"
version = "0.18.0"
authors = [ "Sébastien Crozet <[email protected]>" ]
authors = ["Sébastien Crozet <[email protected]>"]
description = "Testbed for the Rapier 2-dimensional physics engine in Rust."
homepage = "http://rapier.org"
repository = "https://github.com/dimforge/rapier"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "impulse_joints" ]
categories = ["science", "game-development", "mathematics", "simulation", "wasm"]
keywords = ["physics", "dynamics", "rigid", "real-time", "impulse_joints"]
license = "Apache-2.0"
edition = "2021"

Expand All @@ -16,48 +16,48 @@ maintenance = { status = "actively-developed" }
[lib]
name = "rapier_testbed2d"
path = "../../src_testbed/lib.rs"
required-features = [ "dim2" ]
required-features = ["dim2"]

[features]
default = [ "dim2" ]
dim2 = [ ]
parallel = [ "rapier/parallel", "num_cpus" ]
other-backends = [ "wrapped2d" ]
default = ["dim2"]
dim2 = []
parallel = ["rapier/parallel", "num_cpus"]
other-backends = ["wrapped2d"]

[package.metadata.docs.rs]
features = ["parallel", "other-backends"]

[dependencies]
nalgebra = { version = "0.32", features = [ "rand" ] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
num_cpus = { version = "1", optional = true }
wrapped2d = { version = "0.4", optional = true }
nalgebra = { version = "0.32", features = ["rand"] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = ["web-sys", "now"] }
bitflags = "1"
num_cpus = { version = "1", optional = true }
wrapped2d = { version = "0.4", optional = true }
crossbeam = "0.8"
bincode = "1"
Inflector = "0.11"
Inflector = "0.11"
md5 = "0.7"

bevy_egui = "0.23"
bevy_ecs = "0.12"
bevy_core_pipeline = "0.12"
bevy_pbr = "0.12"
bevy_sprite = "0.12"
bevy_egui = "0.26"
bevy_ecs = "0.13"
bevy_core_pipeline = "0.13"
bevy_pbr = "0.13"
bevy_sprite = "0.13"
#bevy_prototype_debug_lines = "0.7"

# Dependencies for native only.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_asset", "bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }

# Dependencies for WASM only.
[target.'cfg(target_arch = "wasm32")'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_asset", "bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }
#bevy_webgl2 = "0.5"

[dependencies.rapier]
package = "rapier2d-f64"
path = "../rapier2d-f64"
version = "0.18.0"
features = [ "serde-serialize", "debug-render", "profiler" ]
features = ["serde-serialize", "debug-render", "profiler"]
50 changes: 25 additions & 25 deletions crates/rapier_testbed2d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "rapier_testbed2d"
name = "rapier_testbed2d"
version = "0.18.0"
authors = [ "Sébastien Crozet <[email protected]>" ]
authors = ["Sébastien Crozet <[email protected]>"]
description = "Testbed for the Rapier 2-dimensional physics engine in Rust."
homepage = "http://rapier.org"
repository = "https://github.com/dimforge/rapier"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "impulse_joints" ]
categories = ["science", "game-development", "mathematics", "simulation", "wasm"]
keywords = ["physics", "dynamics", "rigid", "real-time", "impulse_joints"]
license = "Apache-2.0"
edition = "2021"

Expand All @@ -16,48 +16,48 @@ maintenance = { status = "actively-developed" }
[lib]
name = "rapier_testbed2d"
path = "../../src_testbed/lib.rs"
required-features = [ "dim2" ]
required-features = ["dim2"]

[features]
default = [ "dim2" ]
dim2 = [ ]
parallel = [ "rapier/parallel", "num_cpus" ]
other-backends = [ "wrapped2d" ]
default = ["dim2"]
dim2 = []
parallel = ["rapier/parallel", "num_cpus"]
other-backends = ["wrapped2d"]

[package.metadata.docs.rs]
features = ["parallel", "other-backends"]

[dependencies]
nalgebra = { version = "0.32", features = [ "rand" ] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
num_cpus = { version = "1", optional = true }
wrapped2d = { version = "0.4", optional = true }
nalgebra = { version = "0.32", features = ["rand"] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = ["web-sys", "now"] }
bitflags = "1"
num_cpus = { version = "1", optional = true }
wrapped2d = { version = "0.4", optional = true }
crossbeam = "0.8"
bincode = "1"
Inflector = "0.11"
Inflector = "0.11"
md5 = "0.7"

bevy_egui = "0.23"
bevy_ecs = "0.12"
bevy_core_pipeline = "0.12"
bevy_pbr = "0.12"
bevy_sprite = "0.12"
bevy_egui = "0.26"
bevy_ecs = "0.13"
bevy_core_pipeline = "0.13"
bevy_pbr = "0.13"
bevy_sprite = "0.13"
#bevy_prototype_debug_lines = "0.7"

# Dependencies for native only.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_sprite", "bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_sprite", "bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }

# Dependencies for WASM only.
[target.'cfg(target_arch = "wasm32")'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_sprite", "bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_sprite", "bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }
#bevy_webgl2 = "0.5"

[dependencies.rapier]
package = "rapier2d"
path = "../rapier2d"
version = "0.18.0"
features = [ "serde-serialize", "debug-render", "profiler" ]
features = ["serde-serialize", "debug-render", "profiler"]
50 changes: 25 additions & 25 deletions crates/rapier_testbed3d-f64/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "rapier_testbed3d-f64"
name = "rapier_testbed3d-f64"
version = "0.18.0"
authors = [ "Sébastien Crozet <[email protected]>" ]
authors = ["Sébastien Crozet <[email protected]>"]
description = "Testbed for the Rapier 3-dimensional physics engine in Rust."
homepage = "http://rapier.org"
repository = "https://github.com/dimforge/rapier"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "impulse_joints" ]
categories = ["science", "game-development", "mathematics", "simulation", "wasm"]
keywords = ["physics", "dynamics", "rigid", "real-time", "impulse_joints"]
license = "Apache-2.0"
edition = "2021"

Expand All @@ -16,47 +16,47 @@ maintenance = { status = "actively-developed" }
[lib]
name = "rapier_testbed3d"
path = "../../src_testbed/lib.rs"
required-features = [ "dim3" ]
required-features = ["dim3"]

[features]
default = [ "dim3" ]
dim3 = [ ]
parallel = [ "rapier/parallel", "num_cpus" ]
default = ["dim3"]
dim3 = []
parallel = ["rapier/parallel", "num_cpus"]

[package.metadata.docs.rs]
features = ["parallel"]

[dependencies]
nalgebra = { version = "0.32", features = [ "rand" ] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
num_cpus = { version = "1", optional = true }
nalgebra = { version = "0.32", features = ["rand"] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = ["web-sys", "now"] }
bitflags = "1"
num_cpus = { version = "1", optional = true }
crossbeam = "0.8"
bincode = "1"
md5 = "0.7"
Inflector = "0.11"
serde = { version = "1", features = [ "derive" ] }

bevy_egui = "0.23"
bevy_ecs = "0.12"
bevy_core_pipeline = "0.12"
bevy_pbr = "0.12"
bevy_sprite = "0.12"
Inflector = "0.11"
serde = { version = "1", features = ["derive"] }

bevy_egui = "0.26"
bevy_ecs = "0.13"
bevy_core_pipeline = "0.13"
bevy_pbr = "0.13"
bevy_sprite = "0.13"
#bevy_prototype_debug_lines = { version = "0.7", features = [ "3d" ] }

# Dependencies for native only.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }

# Dependencies for WASM only.
[target.'cfg(target_arch = "wasm32")'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }
#bevy_webgl2 = "0.5"

[dependencies.rapier]
package = "rapier3d-f64"
path = "../rapier3d-f64"
version = "0.18.0"
features = [ "serde-serialize", "debug-render", "profiler" ]
features = ["serde-serialize", "debug-render", "profiler"]
54 changes: 27 additions & 27 deletions crates/rapier_testbed3d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "rapier_testbed3d"
name = "rapier_testbed3d"
version = "0.18.0"
authors = [ "Sébastien Crozet <[email protected]>" ]
authors = ["Sébastien Crozet <[email protected]>"]
description = "Testbed for the Rapier 3-dimensional physics engine in Rust."
homepage = "http://rapier.org"
repository = "https://github.com/dimforge/rapier"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "impulse_joints" ]
categories = ["science", "game-development", "mathematics", "simulation", "wasm"]
keywords = ["physics", "dynamics", "rigid", "real-time", "impulse_joints"]
license = "Apache-2.0"
edition = "2021"

Expand All @@ -16,51 +16,51 @@ maintenance = { status = "actively-developed" }
[lib]
name = "rapier_testbed3d"
path = "../../src_testbed/lib.rs"
required-features = [ "dim3" ]
required-features = ["dim3"]

[features]
default = [ "dim3" ]
dim3 = [ ]
parallel = [ "rapier/parallel", "num_cpus" ]
other-backends = [ "physx", "physx-sys", "glam" ]
default = ["dim3"]
dim3 = []
parallel = ["rapier/parallel", "num_cpus"]
other-backends = ["physx", "physx-sys", "glam"]

[package.metadata.docs.rs]
features = ["parallel", "other-backends"]

[dependencies]
nalgebra = { version = "0.32", features = [ "rand" ] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
glam = { version = "0.24", optional = true } # For Physx
num_cpus = { version = "1", optional = true }
physx = { version = "0.19", features = [ "glam" ], optional = true }
nalgebra = { version = "0.32", features = ["rand"] }
rand = "0.8"
rand_pcg = "0.3"
instant = { version = "0.1", features = ["web-sys", "now"] }
bitflags = "1"
glam = { version = "0.24", optional = true } # For Physx
num_cpus = { version = "1", optional = true }
physx = { version = "0.19", features = ["glam"], optional = true }
physx-sys = { version = "0.11", optional = true }
crossbeam = "0.8"
bincode = "1"
md5 = "0.7"
Inflector = "0.11"
serde = { version = "1", features = [ "derive" ] }
Inflector = "0.11"
serde = { version = "1", features = ["derive"] }

bevy_egui = "0.23"
bevy_ecs = "0.12"
bevy_core_pipeline = "0.12"
bevy_pbr = "0.12"
bevy_sprite = "0.12"
bevy_egui = "0.26"
bevy_ecs = "0.13"
bevy_core_pipeline = "0.13"
bevy_pbr = "0.13"
bevy_sprite = "0.13"
#bevy_prototype_debug_lines = { version = "0.7", features = [ "3d" ] }

# Dependencies for native only.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_winit", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }

# Dependencies for WASM only.
[target.'cfg(target_arch = "wasm32")'.dependencies]
bevy = {version = "0.12", default-features = false, features = ["bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"]}
bevy = { version = "0.13", default-features = false, features = ["bevy_winit", "tonemapping_luts", "ktx2", "zstd", "bevy_render", "bevy_pbr", "bevy_gizmos"] }
#bevy_webgl2 = "0.5"

[dependencies.rapier]
package = "rapier3d"
path = "../rapier3d"
version = "0.18.0"
features = [ "serde-serialize", "debug-render", "profiler" ]
features = ["serde-serialize", "debug-render", "profiler"]
8 changes: 4 additions & 4 deletions examples3d/vehicle_joints3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ pub fn init_world(testbed: &mut Testbed) {

for key in gfx.keys().get_pressed() {
match *key {
KeyCode::Right => {
KeyCode::ArrowRight => {
steering = -1.0;
}
KeyCode::Left => {
KeyCode::ArrowLeft => {
steering = 1.0;
}
KeyCode::Up => {
KeyCode::ArrowUp => {
thrust = -drive_strength;
}
KeyCode::Down => {
KeyCode::ArrowDown => {
thrust = drive_strength;
}
KeyCode::ShiftRight => {
Expand Down
2 changes: 1 addition & 1 deletion src_testbed/camera2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl OrbitCameraPlugin {
fn mouse_motion_system(
_time: Res<Time>,
mut mouse_motion_events: EventReader<MouseMotion>,
mouse_button_input: Res<Input<MouseButton>>,
mouse_button_input: Res<ButtonInput<MouseButton>>,
mut query: Query<(&mut OrbitCamera, &mut Transform, &mut Camera)>,
) {
let mut delta = Vec2::ZERO;
Expand Down
2 changes: 1 addition & 1 deletion src_testbed/camera3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl OrbitCameraPlugin {
fn mouse_motion_system(
time: Res<Time>,
mut mouse_motion_events: EventReader<MouseMotion>,
mouse_button_input: Res<Input<MouseButton>>,
mouse_button_input: Res<ButtonInput<MouseButton>>,
mut query: Query<(&mut OrbitCamera, &mut Transform, &mut Camera)>,
) {
let mut delta = Vec2::ZERO;
Expand Down
Loading

0 comments on commit 67701de

Please sign in to comment.