Skip to content

Commit

Permalink
Upgrade to bevy 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
blaind committed Apr 17, 2022
1 parent 0747a4e commit 90fb128
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_text_mesh"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
description = "A bevy 3D text mesh generator for displaying text"
repository = "https://github.com/blaind/bevy_text_mesh"
Expand All @@ -18,15 +18,15 @@ anyhow = "1.0"
glyph_brush_layout = "0.2.3"

[dependencies.bevy]
version = "0.6.0"
version = "0.7.0"
default-features = false
features = ["render"]

[dev-dependencies]
rand = "0.8.4"

[dev-dependencies.bevy]
version = "0.6.0"
version = "0.7.0"
default-features = false
features = [
"bevy_winit",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Consider this as a preview of the plugin for gathering feedback about the API:

| bevy | bevy_text_mesh |
| ---- | -------------- |
| 0.7 | 0.2.0 |
| 0.6 | 0.1.0 |
| 0.5 | 0.0.2 |

Expand Down
8 changes: 4 additions & 4 deletions examples/3d_scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ fn main() {
.insert_resource(Msaa { samples: 4 })
.add_plugins(DefaultPlugins)
.add_plugin(TextMeshPlugin)
.add_startup_system(setup.system())
.add_startup_system(setup_text_mesh.system())
.add_system(update_text_mesh.system())
.add_system(rotate_camera.system())
.add_startup_system(setup)
.add_startup_system(setup_text_mesh)
.add_system(update_text_mesh)
.add_system(rotate_camera)
.run();
}

Expand Down
12 changes: 6 additions & 6 deletions examples/performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ fn main() {
.add_plugin(TextMeshPlugin)
.add_plugin(FrameTimeDiagnosticsPlugin::default())
.add_plugin(LogDiagnosticsPlugin::default())
.add_startup_system(setup.system())
.add_startup_system(setup_text_mesh.system())
.add_system(spawn_meshes.system())
.add_system(update_text_mesh.system())
.add_system(rotate_camera.system())
.add_system_to_stage(CoreStage::PostUpdate, update_frame_rate.system())
.add_startup_system(setup)
.add_startup_system(setup_text_mesh)
.add_system(spawn_meshes)
.add_system(update_text_mesh)
.add_system(rotate_camera)
.add_system_to_stage(CoreStage::PostUpdate, update_frame_rate)
.run();
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub struct TextMeshPlugin;
impl Plugin for TextMeshPlugin {
fn build(&self, app: &mut App) {
app.add_asset::<font_loader::TextMeshFont>()
.add_system(mesh_system::text_mesh.system())
.add_system(mesh_system::font_loaded.system())
.add_system(mesh_system::text_mesh)
.add_system(mesh_system::font_loaded)
.insert_resource(MeshCache::default())
.init_asset_loader::<font_loader::FontLoader>();
}
Expand Down
6 changes: 3 additions & 3 deletions src/mesh_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ impl Default for TextMeshState {
}

fn apply_mesh(mesh_data: MeshData, mesh: &mut Mesh) {
mesh.set_attribute(Mesh::ATTRIBUTE_POSITION, mesh_data.vertices);
mesh.set_attribute(Mesh::ATTRIBUTE_NORMAL, mesh_data.normals);
mesh.set_attribute(Mesh::ATTRIBUTE_UV_0, mesh_data.uvs);
mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, mesh_data.vertices);
mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, mesh_data.normals);
mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, mesh_data.uvs);
mesh.set_indices(Some(Indices::U32(mesh_data.indices)));
}

0 comments on commit 90fb128

Please sign in to comment.