Skip to content

Commit 5b80901

Browse files
authored
Release 0.2.0 (#599)
1 parent 0c6ef31 commit 5b80901

File tree

10 files changed

+65
-69
lines changed

10 files changed

+65
-69
lines changed

README.md

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,26 @@ Below are some of the current features of Avian.
5959
- `f32`/`f64` precision (`f32` by default)
6060

6161
You can find a more complete list along with documentation in the
62-
[Table of contents](https://docs.rs/avian3d/latest/avian3d/#table-of-contents)
62+
[Table of Contents](https://docs.rs/avian3d/latest/avian3d/#table-of-contents)
6363
on docs.rs.
6464

6565
## Documentation
6666

6767
- [2D documentation](https://docs.rs/avian2d)
6868
- [3D documentation](https://docs.rs/avian3d)
6969

70-
## Usage example
70+
## Usage Example
7171

7272
First, add `avian2d` or `avian3d` to your dependencies in `Cargo.toml`:
7373

7474
```toml
7575
# For 2D applications:
7676
[dependencies]
77-
avian2d = "0.1"
77+
avian2d = "0.2"
7878

7979
# For 3D applications:
8080
[dependencies]
81-
avian3d = "0.1"
81+
avian3d = "0.2"
8282

8383
# If you want to use the most up-to-date version, you can follow the main branch:
8484
[dependencies]
@@ -109,47 +109,40 @@ fn setup(
109109
commands.spawn((
110110
RigidBody::Static,
111111
Collider::cylinder(4.0, 0.1),
112-
PbrBundle {
113-
mesh: meshes.add(Cylinder::new(4.0, 0.1)),
114-
material: materials.add(Color::WHITE),
115-
..default()
116-
},
112+
Mesh3d(meshes.add(Cylinder::new(4.0, 0.1))),
113+
MeshMaterial3d(materials.add(Color::WHITE)),
117114
));
118115

119116
// Dynamic physics object with a collision shape and initial angular velocity
120117
commands.spawn((
121118
RigidBody::Dynamic,
122119
Collider::cuboid(1.0, 1.0, 1.0),
123120
AngularVelocity(Vec3::new(2.5, 3.5, 1.5)),
124-
PbrBundle {
125-
mesh: meshes.add(Cuboid::from_length(1.0)),
126-
material: materials.add(Color::srgb_u8(124, 144, 255)),
127-
transform: Transform::from_xyz(0.0, 4.0, 0.0),
128-
..default()
129-
},
121+
Mesh3d(meshes.add(Cuboid::from_length(1.0))),
122+
MeshMaterial3d(materials.add(Color::srgb_u8(124, 144, 255))),
123+
Transform::from_xyz(0.0, 4.0, 0.0),
130124
));
131125

132126
// Light
133-
commands.spawn(PointLightBundle {
134-
point_light: PointLight {
127+
commands.spawn((
128+
PointLight {
135129
shadows_enabled: true,
136130
..default()
137131
},
138-
transform: Transform::from_xyz(4.0, 8.0, 4.0),
139-
..default()
140-
});
132+
Transform::from_xyz(4.0, 8.0, 4.0),
133+
));
141134

142135
// Camera
143-
commands.spawn(Camera3dBundle {
144-
transform: Transform::from_xyz(-2.5, 4.5, 9.0).looking_at(Vec3::ZERO, Dir3::Y),
145-
..default()
146-
});
136+
commands.spawn((
137+
Camera3d::default(),
138+
Transform::from_xyz(-2.5, 4.5, 9.0).looking_at(Vec3::ZERO, Dir3::Y),
139+
));
147140
}
148141
```
149142

150143
![A spinning cube falling onto a circular platform](https://github.com/user-attachments/assets/14d25e7e-9d46-467c-9fe6-dc408cd23398)
151144

152-
## More examples
145+
## More Examples
153146

154147
You can find lots of 2D and 3D examples in [/crates/avian2d/examples](/crates/avian2d/examples) and [/crates/avian3d/examples](/crates/avian3d/examples) respectively.
155148

@@ -164,11 +157,11 @@ and precision:
164157
cargo run --example cubes --no-default-features --features "3d f64 parry-f64"
165158
```
166159

167-
## Supported Bevy versions
160+
## Supported Bevy Versions
168161

169162
| Bevy | Avian |
170163
| ------- | ----- |
171-
| 0.15 | main |
164+
| 0.15 | 0.2 |
172165
| 0.14 | 0.1 |
173166

174167
<details>
@@ -184,7 +177,7 @@ cargo run --example cubes --no-default-features --features "3d f64 parry-f64"
184177

185178
</details>
186179

187-
## Future features
180+
## Future Features
188181

189182
- Per-entity collision hooks or callbacks
190183
- Flags for what types of collisions are active, like collisions against specific rigid body types, sensors or parents

crates/avian2d/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avian2d"
3-
version = "0.1.2"
3+
version = "0.2.0"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Joona Aalto <[email protected]>"]
@@ -61,7 +61,7 @@ required-features = ["2d"]
6161
bench = false
6262

6363
[dependencies]
64-
avian_derive = { path = "../avian_derive", version = "0.1" }
64+
avian_derive = { path = "../avian_derive", version = "0.2" }
6565
bevy = { version = "0.15", default-features = false }
6666
bevy_math = { version = "0.15" }
6767
bevy_heavy = { version = "0.1" }
@@ -86,7 +86,7 @@ glam = { version = "0.29", features = ["bytemuck"] }
8686
approx = "0.5"
8787
bytemuck = "1.19"
8888
criterion = { version = "0.5", features = ["html_reports"] }
89-
bevy_mod_debugdump = { git = "https://github.com/jakobhellermann/bevy_mod_debugdump" }
89+
bevy_mod_debugdump = { version = "0.12" }
9090

9191
[[example]]
9292
name = "dynamic_character_2d"

crates/avian2d/examples/custom_collider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
.insert_resource(Gravity::ZERO)
2626
.add_systems(Startup, setup)
2727
.add_systems(
28-
PhysicsSchedule,
28+
FixedUpdate,
2929
(center_gravity, rotate).in_set(PhysicsStepSet::First),
3030
)
3131
.run();

crates/avian3d/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avian3d"
3-
version = "0.1.2"
3+
version = "0.2.0"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Joona Aalto <[email protected]>"]
@@ -63,7 +63,7 @@ required-features = ["3d"]
6363
bench = false
6464

6565
[dependencies]
66-
avian_derive = { path = "../avian_derive", version = "0.1" }
66+
avian_derive = { path = "../avian_derive", version = "0.2" }
6767
bevy = { version = "0.15", default-features = false }
6868
bevy_math = { version = "0.15" }
6969
bevy_heavy = { version = "0.1" }
@@ -90,7 +90,7 @@ bevy_math = { version = "0.15", features = ["approx"] }
9090
bevy_heavy = { version = "0.1", features = ["approx"] }
9191
approx = "0.5"
9292
criterion = { version = "0.5", features = ["html_reports"] }
93-
bevy_mod_debugdump = { git = "https://github.com/jakobhellermann/bevy_mod_debugdump" }
93+
bevy_mod_debugdump = { version = "0.12" }
9494

9595
[[example]]
9696
name = "dynamic_character_3d"

crates/avian_derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "avian_derive"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Joona Aalto <[email protected]>"]
7-
description = "Provides derive implementations for Avian"
7+
description = "Provides derive implementations for Avian Physics"
88
repository = "https://github.com/Jondolf/avian"
99
readme = "README.md"
1010

crates/avian_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Provides derive implementations for Avian.
1+
//! Provides derive implementations for [Avian Physics](https://github.com/Jondolf/avian).
22
33
use proc_macro::TokenStream;
44

0 commit comments

Comments
 (0)