Skip to content

Commit afdb6e7

Browse files
committed
Squash commit (updates for Bevy 0.13)
* Use GitHub Actions config from master branch * Fix formatting * Fix deprecation warnings on add_plugin Fix CI (#218) Fix shader (#219) Suggest to use `cargo add` in README.md (#222) Use `SpatialBundle` (#221) Use `configure_sets` API (#223) Use `MaterialMesh2dBundle` with `ColorMaterial` (#224) * Use `MaterialMesh2dBundle` with `ColorMaterial` * clippy * Fix green channel filtering bug * Clippy again Fix clippy (#229) * Add `RenderAssetPersistencePolicy` to `Mesh::new` call * Use built-in `Name` component in `svg` example Fix CI (#234) * Use `RenderAssetUsages` * Specify which `RegularPolygon` to use Fix CI (#237) Update Cargo.toml Update `README.md` Update CHANGELOG.md
1 parent e77fc7c commit afdb6e7

File tree

6 files changed

+37
-14
lines changed

6 files changed

+37
-14
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66
## 0.9.0
77
- Support for Bevy 0.11.
88

9+
## 0.11.0
10+
- Support for Bevy 0.13
11+
12+
## 0.10.0
13+
- Support for Bevy 0.12
14+
15+
## 0.9.0
16+
- `ShapeBundle` now contains the `spatial: SpatialBundle` field,
17+
which bundles together
18+
`Transform`,
19+
`GlobalTransform`,
20+
`Visibility`
21+
and `InheritedVisibility`.
22+
923
## 0.8.0
1024
- Support for Bevy 0.10.
1125
- Uses original render.

Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,23 @@ license = "MIT OR Apache-2.0"
88
name = "bevy_prototype_lyon"
99
readme = "README.md"
1010
repository = "https://github.com/Nilirad/bevy_prototype_lyon/"
11-
version = "0.10.0"
11+
version = "0.11.0"
1212

1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[dependencies]
16-
bevy = { version = "0.12", default-features = false, features = ["bevy_sprite", "bevy_render", "bevy_core_pipeline", "bevy_asset"] }
16+
bevy = { version = "0.13", default-features = false, features = [
17+
"bevy_sprite",
18+
"bevy_render",
19+
"bevy_core_pipeline",
20+
"bevy_asset",
21+
] }
1722
lyon_tessellation = "1"
1823
lyon_algorithms = "1"
1924
svgtypes = "0.12"
2025

2126
[dev-dependencies]
22-
bevy = { version = "0.12", default-features = false, features = ["x11", "bevy_asset"] }
27+
bevy = { version = "0.13", default-features = false, features = [
28+
"x11",
29+
"bevy_asset",
30+
] }

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ I strive to support the latest version of Bevy. Support for a version of Bevy is
6767
The following table shows the latest version of `bevy_prototype_lyon` that supports a certain version of Bevy.
6868

6969
|bevy|bevy_prototype_lyon|license|
70-
|----|---|---|
70+
|---|---|---|
71+
|0.13|0.11|MIT/Apache 2.0|
7172
|0.12|0.10|MIT/Apache 2.0|
7273
|0.11|0.9|MIT/Apache 2.0|
7374
|0.10|0.8|MIT/Apache 2.0|

examples/svg.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ fn main() {
1111
.run();
1212
}
1313

14-
#[derive(Component)]
15-
struct Name(String);
16-
1714
#[derive(Component)]
1815
struct BlacksmithMarker;
1916

@@ -25,7 +22,7 @@ fn setup_system(mut commands: Commands) {
2522

2623
commands
2724
.spawn((
28-
Name("Blacksmith".to_owned()),
25+
Name::new("Blacksmith"),
2926
BlacksmithMarker,
3027
SpatialBundle {
3128
transform: Transform::from_translation(Vec3::new(-50., 0., 0.)),
@@ -62,7 +59,7 @@ fn setup_system(mut commands: Commands) {
6259

6360
commands
6461
.spawn((
65-
Name("Shack".to_owned()),
62+
Name::new("Shack"),
6663
ToolShackMarker,
6764
SpatialBundle {
6865
transform: Transform {

src/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl ShapePath {
3232
///
3333
/// ```
3434
/// # use bevy::prelude::*;
35-
/// # use bevy_prototype_lyon::prelude::*;
35+
/// # use bevy_prototype_lyon::prelude::{RegularPolygon, *};
3636
/// #
3737
/// # #[derive(Component)]
3838
/// # struct Player;
@@ -73,7 +73,7 @@ impl ShapePath {
7373
///
7474
/// ```
7575
/// # use bevy::prelude::*;
76-
/// # use bevy_prototype_lyon::prelude::*;
76+
/// # use bevy_prototype_lyon::prelude::{RegularPolygon, *};
7777
/// #
7878
/// # #[derive(Component)]
7979
/// # struct Player;

src/plugin.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
use bevy::{
1515
prelude::*,
16-
render::{mesh::Indices, render_resource::PrimitiveTopology},
16+
render::{mesh::Indices, render_asset::RenderAssetUsages, render_resource::PrimitiveTopology},
1717
sprite::Mesh2dHandle,
1818
};
1919
use lyon_tessellation::{self as tess, BuffersBuilder};
@@ -127,8 +127,11 @@ fn stroke(
127127
}
128128

129129
fn build_mesh(buffers: &VertexBuffers) -> Mesh {
130-
let mut mesh = Mesh::new(PrimitiveTopology::TriangleList);
131-
mesh.set_indices(Some(Indices::U32(buffers.indices.clone())));
130+
let mut mesh = Mesh::new(
131+
PrimitiveTopology::TriangleList,
132+
RenderAssetUsages::RENDER_WORLD,
133+
);
134+
mesh.insert_indices(Indices::U32(buffers.indices.clone()));
132135
mesh.insert_attribute(
133136
Mesh::ATTRIBUTE_POSITION,
134137
buffers

0 commit comments

Comments
 (0)