From 4d09d17614b7e71db25444581d1f18d0d155bdd2 Mon Sep 17 00:00:00 2001 From: Mark Moissette Date: Thu, 28 Sep 2023 16:53:21 +0200 Subject: [PATCH] fix(): various Fixes and tweaks (#7) * fixed license files name typo * fixed bad links * fixed typo in the repo name !! * updated crates to 0.1.1 * added missing parts in README files --- Cargo.lock | 12 ++-- LICENCE.md => LICENSE.md | 0 README.md | 8 +-- crates/bevy_gltf_blueprints/Cargo.toml | 8 +-- .../{LICENCE.md => LICENSE.md} | 0 crates/bevy_gltf_blueprints/README.md | 59 ++++++++++++++++--- crates/bevy_gltf_components/Cargo.toml | 6 +- .../{LICENCE.md => LICENSE.md} | 0 crates/bevy_gltf_components/README.md | 25 ++++++-- crates/bevy_gltf_components/src/lib.rs | 2 +- 10 files changed, 89 insertions(+), 31 deletions(-) rename LICENCE.md => LICENSE.md (100%) rename crates/bevy_gltf_blueprints/{LICENCE.md => LICENSE.md} (100%) rename crates/bevy_gltf_components/{LICENCE.md => LICENSE.md} (100%) diff --git a/Cargo.lock b/Cargo.lock index caeae81..64661bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -721,15 +721,15 @@ dependencies = [ [[package]] name = "bevy_gltf_blueprints" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bevy", - "bevy_gltf_components 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bevy_gltf_components 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bevy_gltf_components" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bevy", "ron", @@ -738,9 +738,9 @@ dependencies = [ [[package]] name = "bevy_gltf_components" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168c88211436e833f6f5104d2f2db8a9f3d705b6c6ae22b921f1be6b80b7d4cb" +checksum = "680276f556c9caf53a32ec0604f9aa4ae336c506bec40d34f6daa33f32a22f13" dependencies = [ "bevy", "ron", @@ -755,7 +755,7 @@ dependencies = [ "bevy_asset_loader", "bevy_editor_pls", "bevy_gltf_blueprints", - "bevy_gltf_components 0.1.0", + "bevy_gltf_components 0.1.1", "bevy_rapier3d", "rand", "ron", diff --git a/LICENCE.md b/LICENSE.md similarity index 100% rename from LICENCE.md rename to LICENSE.md diff --git a/README.md b/README.md index 574a9c8..adf6cb1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) -[![License](https://img.shields.io/crates/l/bevy_gltf_components)](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/blob/main/License.md) +[![License](https://img.shields.io/crates/l/bevy_gltf_components)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/LICENSE.md) -# Blender_bevy_components_worklflow +# Blender_bevy_components_workflow ![demo](./docs/blender_gltf_components.png) @@ -28,10 +28,10 @@ It also allows you to setup 'blueprints' in Blender by using collections (the re ## Crates -- [bevy_gltf_components]('./crates/bevy_gltf_components/) This crate allows you to define components direclty inside gltf files and instanciate/inject the components on the Bevy side. +- [bevy_gltf_components](./crates/bevy_gltf_components/) This crate allows you to define components direclty inside gltf files and instanciate/inject the components on the Bevy side. There is a [video tutorial/explanation](https://youtu.be/-lcScjQCA3c) if you want, or you can read the crate docs/ basic example -- [bevy_gltf_blueprints]('./crates/bevy_gltf_blueprints/) This crate adds the ability to define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy. With the ability to override and add components when spawning. +- [bevy_gltf_blueprints](./crates/bevy_gltf_blueprints/) This crate adds the ability to define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy. With the ability to override and add components when spawning. ## Tools diff --git a/crates/bevy_gltf_blueprints/Cargo.toml b/crates/bevy_gltf_blueprints/Cargo.toml index 881f1ad..60fedb9 100644 --- a/crates/bevy_gltf_blueprints/Cargo.toml +++ b/crates/bevy_gltf_blueprints/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "bevy_gltf_blueprints" -version = "0.1.0" +version = "0.1.1" authors = ["Mark 'kaosat-dev' Moissette"] description = "Adds the ability to define Blueprints/Prefabs for [Bevy](https://bevyengine.org/) inside gltf files and spawn them in Bevy." -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_worklflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_worklflow" +homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" +repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" keywords = ["gamedev", "bevy", "gltf", "blueprint", "prefab"] categories = ["game-development"] edition = "2021" @@ -14,5 +14,5 @@ license = "MIT OR Apache-2.0" bevy="0.11.2" [dependencies] -bevy_gltf_components = "0.1.0" +bevy_gltf_components = "0.1.1" bevy = { version = "0.11.2", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation"] } diff --git a/crates/bevy_gltf_blueprints/LICENCE.md b/crates/bevy_gltf_blueprints/LICENSE.md similarity index 100% rename from crates/bevy_gltf_blueprints/LICENCE.md rename to crates/bevy_gltf_blueprints/LICENSE.md diff --git a/crates/bevy_gltf_blueprints/README.md b/crates/bevy_gltf_blueprints/README.md index 3f6eda2..4a5cea7 100644 --- a/crates/bevy_gltf_blueprints/README.md +++ b/crates/bevy_gltf_blueprints/README.md @@ -1,6 +1,6 @@ [![Crates.io](https://img.shields.io/crates/v/bevy_gltf_blueprints)](https://crates.io/crates/bevy_gltf_blueprints) [![Docs](https://img.shields.io/docsrs/bevy_gltf_blueprints)](https://docs.rs/bevy_gltf_blueprints/latest/bevy_gltf_blueprints/) -[![License](https://img.shields.io/crates/l/bevy_gltf_blueprints)](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/blob/main/crates/bevy_gltf_blueprints/License.md) +[![License](https://img.shields.io/crates/l/bevy_gltf_blueprints)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_gltf_blueprints/License.md) [![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) # bevy_gltf_blueprints @@ -12,7 +12,7 @@ A blueprint is a set of **overrideable** components + a hierarchy: ie * just a Gltf file with Gltf_extras specifying components * a component called BlueprintName -Particularly useful when using [Blender](https://www.blender.org/) as an editor for the [Bevy](https://bevyengine.org/) game engine, combined with the [Blender plugin](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/tree/main/tools/gltf_auto_export) that does a lot of the work for you +Particularly useful when using [Blender](https://www.blender.org/) as an editor for the [Bevy](https://bevyengine.org/) game engine, combined with the [Blender plugin](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/gltf_auto_export) that does a lot of the work for you ## Usage @@ -22,7 +22,8 @@ Here's a minimal usage example: ```toml # Cargo.toml [dependencies] -bevy_gltf_blueprints = { version = "0.1.0"} +bevy="0.11.2" +bevy_gltf_blueprints = { version = "0.1.1"} ``` @@ -55,10 +56,54 @@ fn spawn_blueprint( } ``` +## Installation + +Add the following to your `[dependencies]` section in `Cargo.toml`: + +```toml +bevy_gltf_blueprints = "0.1.1" +``` + +Or use `cargo add`: + +```toml +cargo add bevy_gltf_blueprints +``` + ## Setup -- configure your "library"/"blueprints" path: - advanced/models/library/ +```rust no_run +use bevy::prelude::*; +use bevy_gltf_blueprints::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugin(BlueprintsPlugin) + + .run(); +} + +``` + +you may want to configure your "library"/"blueprints" path: (defaults to ```assets/models/library```) so the plugin know where to look for the blueprint files + +```rust no_run +use bevy::prelude::*; +use bevy_gltf_blueprints::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugin( + BlueprintsPlugin{ + library_folder: "advanced/models/library".into() // replace this with your blueprints library path , relative to the assets folder + } + ) + .run(); +} + +``` ## Spawning entities from blueprints @@ -132,11 +177,11 @@ Typically , the order of systems should be ***bevy_gltf_components (GltfComponentsSet::Injection)*** => ***bevy_gltf_blueprints (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn)*** => ***replace_proxies*** -see https://github.com/kaosat-dev/Blender_bevy_components_worklflow/tree/main/examples/advanced for how to set it up correctly +see https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/advanced for how to set it up correctly ## Examples -https://github.com/kaosat-dev/Blender_bevy_components_worklflow/tree/main/examples/advanced +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/advanced ## License diff --git a/crates/bevy_gltf_components/Cargo.toml b/crates/bevy_gltf_components/Cargo.toml index a596ab3..f97ca5f 100644 --- a/crates/bevy_gltf_components/Cargo.toml +++ b/crates/bevy_gltf_components/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "bevy_gltf_components" -version = "0.1.0" +version = "0.1.1" authors = ["Mark 'kaosat-dev' Moissette"] description = "Allows you to define [Bevy](https://bevyengine.org/) components direclty inside gltf files and instanciate the components on the Bevy side." -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_worklflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_worklflow" +homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" +repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" keywords = ["gamedev", "bevy", "assets", "gltf", "components"] categories = ["game-development"] edition = "2021" diff --git a/crates/bevy_gltf_components/LICENCE.md b/crates/bevy_gltf_components/LICENSE.md similarity index 100% rename from crates/bevy_gltf_components/LICENCE.md rename to crates/bevy_gltf_components/LICENSE.md diff --git a/crates/bevy_gltf_components/README.md b/crates/bevy_gltf_components/README.md index fd76281..a54249f 100644 --- a/crates/bevy_gltf_components/README.md +++ b/crates/bevy_gltf_components/README.md @@ -1,6 +1,6 @@ [![Crates.io](https://img.shields.io/crates/v/bevy_gltf_components)](https://crates.io/crates/bevy_gltf_components) [![Docs](https://img.shields.io/docsrs/bevy_gltf_components)](https://docs.rs/bevy_gltf_components/latest/bevy_gltf_components/) -[![License](https://img.shields.io/crates/l/bevy_gltf_components)](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/blob/main/crates/bevy_gltf_components/License.md) +[![License](https://img.shields.io/crates/l/bevy_gltf_components)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_gltf_components/License.md) [![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) @@ -13,9 +13,9 @@ This crate allows you to define [Bevy](https://bevyengine.org/) components direc ***important*** : the plugin for processing gltf files runs in ***update*** , so you cannot use the components directly if you spawn your scene from gltf in ***setup*** (the additional components will not show up) Please see the - * [example](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/examples/basic) + * [example](https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic) * or use [```bevy_asset_loader```](https://github.com/NiklasEi/bevy_asset_loader) for a reliable workflow. - * alternatively, use the [```bevy_gltf_blueprints```](https://github.com/kaosat-dev/Blender_bevy_components_worklflow/blob/main/crates/bevy_gltf_blueprints) crate, build on this crate's features, + * alternatively, use the [```bevy_gltf_blueprints```](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_gltf_blueprints) crate, build on this crate's features, that allows you to directly spawn entities from gltf based blueprints. Here's a minimal usage example: @@ -24,12 +24,12 @@ Here's a minimal usage example: # Cargo.toml [dependencies] bevy="0.11.2" -bevy_gltf_components = { version = "0.1.0"} +bevy_gltf_components = { version = "0.1.1"} ``` ```rust no_run -//too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_worklflow/examples/basic for a real example +//too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic for a real example fn main() { App::new() .add_plugins(DefaultPlugins) @@ -55,6 +55,19 @@ bevy_gltf_components = { version = "0.1.0"} ``` +## Installation + +Add the following to your `[dependencies]` section in `Cargo.toml`: + +```toml +bevy_gltf_components = "0.1.1" +``` + +Or use `cargo add`: + +```toml +cargo add bevy_gltf_components +``` ## SystemSet @@ -72,7 +85,7 @@ Typically , the order of systems should be ## Examples -https://github.com/kaosat-dev/Blender_bevy_components_worklflow/tree/main/examples/basic +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/basic ## License diff --git a/crates/bevy_gltf_components/src/lib.rs b/crates/bevy_gltf_components/src/lib.rs index 00bfdc1..47b21a5 100644 --- a/crates/bevy_gltf_components/src/lib.rs +++ b/crates/bevy_gltf_components/src/lib.rs @@ -20,7 +20,7 @@ use bevy::prelude::{ /// # use bevy::gltf::*; /// # use bevy_gltf_components::ComponentsFromGltfPlugin; /// -/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_worklflow/examples/basic for a real example +/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic for a real example /// fn main() { /// App::new() /// .add_plugins(DefaultPlugins)