diff --git a/Cargo.toml b/Cargo.toml index eb79004..22c1f71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -18,7 +18,7 @@ anyhow = "1.0" glyph_brush_layout = "0.2.3" [dependencies.bevy] -version = "0.6.0" +version = "0.7.0" default-features = false features = ["render"] @@ -26,7 +26,7 @@ features = ["render"] rand = "0.8.4" [dev-dependencies.bevy] -version = "0.6.0" +version = "0.7.0" default-features = false features = [ "bevy_winit", diff --git a/README.md b/README.md index 673eb75..62e7619 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/examples/3d_scene.rs b/examples/3d_scene.rs index 3388952..43d9a18 100644 --- a/examples/3d_scene.rs +++ b/examples/3d_scene.rs @@ -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(); } diff --git a/examples/performance.rs b/examples/performance.rs index 20a7407..53599e2 100644 --- a/examples/performance.rs +++ b/examples/performance.rs @@ -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(); } diff --git a/src/lib.rs b/src/lib.rs index 5f8b27b..5786b6c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,8 +26,8 @@ pub struct TextMeshPlugin; impl Plugin for TextMeshPlugin { fn build(&self, app: &mut App) { app.add_asset::() - .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::(); } diff --git a/src/mesh_system.rs b/src/mesh_system.rs index 1d17e53..88910eb 100644 --- a/src/mesh_system.rs +++ b/src/mesh_system.rs @@ -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))); }