@@ -59,26 +59,26 @@ Below are some of the current features of Avian.
5959- ` f32 ` /` f64 ` precision (` f32 ` by default)
6060
6161You 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 )
6363on 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
7272First, 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
154147You 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:
164157cargo 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
0 commit comments