diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93c2ea6..ed9e4de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: key: ubuntu-latest-cargo-lint-${{ hashFiles('**/Cargo.toml') }} - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.75.0 + toolchain: 1.76.0 components: rustfmt, clippy - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev diff --git a/Cargo.toml b/Cargo.toml index ad3f9cc..707d803 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,12 @@ [workspace] members = [ - "crates/bevy_gltf_components", - "crates/bevy_gltf_blueprints", - "crates/bevy_gltf_save_load", - "crates/bevy_registry_export", - - "examples/common/", - - "examples/bevy_gltf_components/basic/", - "examples/bevy_gltf_blueprints/basic/", - "examples/bevy_gltf_blueprints/basic_xpbd_physics/", - "examples/bevy_gltf_blueprints/animation/", - "examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles", - "examples/bevy_gltf_blueprints/materials/", - "examples/bevy_gltf_save_load/basic/", - "examples/bevy_registry_export/basic", - - "testing/bevy_example" + "crates/*", + "examples/common*", + "examples/bevy_gltf_components/*", + "examples/bevy_gltf_blueprints/*", + "examples/bevy_gltf_save_load/*", + "examples/bevy_registry_export/*", + "testing/bevy_example/", ] resolver = "2" @@ -30,6 +20,10 @@ match_same_arms = "warn" semicolon_if_nothing_returned = "warn" #### --------------------Dev/ debug------------------------------- +# Enable a small amount of optimization in debug mode +[profile.dev] +opt-level = 1 + # Enable high optimizations for dependencies (incl. Bevy), but not for our code: [profile.dev.package."*"] opt-level = 3 diff --git a/crates/bevy_gltf_blueprints/Cargo.toml b/crates/bevy_gltf_blueprints/Cargo.toml index 5d84dfb..9c47f0d 100644 --- a/crates/bevy_gltf_blueprints/Cargo.toml +++ b/crates/bevy_gltf_blueprints/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gltf_blueprints" -version = "0.8.0" +version = "0.9.0" 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_workflow" @@ -13,10 +13,9 @@ license = "MIT OR Apache-2.0" [lints] workspace = true -[dev-dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] } - [dependencies] -bevy_gltf_components = "0.4" -#bevy_gltf_components = { path = "../bevy_gltf_components" } -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] } +bevy_gltf_components = { version = "0.5", path = "../bevy_gltf_components" } +bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] } + +[dev-dependencies] +bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/README.md b/crates/bevy_gltf_blueprints/README.md index db8ff34..6cad9a1 100644 --- a/crates/bevy_gltf_blueprints/README.md +++ b/crates/bevy_gltf_blueprints/README.md @@ -25,8 +25,8 @@ Here's a minimal usage example: ```toml # Cargo.toml [dependencies] -bevy="0.12" -bevy_gltf_blueprints = { version = "0.8"} +bevy="0.13" +bevy_gltf_blueprints = { version = "0.9"} ``` @@ -64,7 +64,7 @@ fn spawn_blueprint( Add the following to your `[dependencies]` section in `Cargo.toml`: ```toml -bevy_gltf_blueprints = "0.8" +bevy_gltf_blueprints = "0.9" ``` Or use `cargo add`: @@ -346,9 +346,10 @@ The main branch is compatible with the latest Bevy release, while the branch `be Compatibility of `bevy_gltf_blueprints` versions: | `bevy_gltf_blueprints` | `bevy` | | :-- | :-- | +| `0.9` | `0.13` | | `0.3 - 0.8` | `0.12` | | `0.1 - 0.2` | `0.11` | -| branch `main` | `0.12` | +| branch `main` | `0.13` | | branch `bevy_main` | `main` | diff --git a/crates/bevy_gltf_blueprints/src/copy_components.rs b/crates/bevy_gltf_blueprints/src/copy_components.rs index 93feba9..e68cd3d 100644 --- a/crates/bevy_gltf_blueprints/src/copy_components.rs +++ b/crates/bevy_gltf_blueprints/src/copy_components.rs @@ -78,6 +78,9 @@ impl CopyComponents { }; for (component, type_id) in components { + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.clone(); + let type_registry = type_registry.read(); let source = component .reflect(world.get_entity(self.source).unwrap()) .unwrap() @@ -90,7 +93,7 @@ impl CopyComponents { // println!("contains typeid {:?} {}", type_id, destination.contains_type_id(type_id)); // we only want to copy components that are NOT already in the destination (ie no overwriting existing components) if !destination.contains_type_id(type_id) { - component.insert(&mut destination, &*source); + component.insert(&mut destination, &*source, &type_registry); } } } diff --git a/crates/bevy_gltf_blueprints/src/materials.rs b/crates/bevy_gltf_blueprints/src/materials.rs index f375b8a..5f0140a 100644 --- a/crates/bevy_gltf_blueprints/src/materials.rs +++ b/crates/bevy_gltf_blueprints/src/materials.rs @@ -30,11 +30,14 @@ pub struct MaterialInfo { pub(crate) fn materials_inject( mut blueprints_config: ResMut, material_infos: Query<(&MaterialInfo, &Children), Added>, - with_materials_and_meshes: Query<( - With, - With>, - With>, - )>, + with_materials_and_meshes: Query< + (), + ( + With, + With>, + With>, + ), + >, models: Res>, asset_server: Res, diff --git a/crates/bevy_gltf_components/Cargo.toml b/crates/bevy_gltf_components/Cargo.toml index af3b5cb..cf1b664 100644 --- a/crates/bevy_gltf_components/Cargo.toml +++ b/crates/bevy_gltf_components/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gltf_components" -version = "0.4.0" +version = "0.5.0" 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_workflow" @@ -13,10 +13,10 @@ license = "MIT OR Apache-2.0" [lints] workspace = true -[dev-dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } - [dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } +bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } serde = "1.0.188" ron = "0.8.1" + +[dev-dependencies] +bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_gltf_components/README.md b/crates/bevy_gltf_components/README.md index d3a2a11..fa5289b 100644 --- a/crates/bevy_gltf_components/README.md +++ b/crates/bevy_gltf_components/README.md @@ -23,8 +23,8 @@ Here's a minimal usage example: ```toml # Cargo.toml [dependencies] -bevy="0.12" -bevy_gltf_components = { version = "0.4"} +bevy="0.13" +bevy_gltf_components = { version = "0.5"} ``` @@ -60,7 +60,7 @@ bevy_gltf_components = { version = "0.4"} Add the following to your `[dependencies]` section in `Cargo.toml`: ```toml -bevy_gltf_components = "0.4" +bevy_gltf_components = "0.5" ``` Or use `cargo add`: @@ -104,6 +104,16 @@ Typically , the order of systems should be ***bevy_gltf_components (GltfComponentsSet::Injection)*** => ***replace_proxies*** +## Additional features + +- as of version 0.5 , this crate also includes automatic handling of lights in gltf files, to attempt to match Blender's eevee rendering as close as possible: + * **BlenderLightShadows** (automatically generated by the gltf_auto_export Blender add-on) allows you to toggle light's shadows on/off in Blender and have matching + behaviour in Bevy + * **BlenderBackgroundShader** aka background color is also automatically set on the Bevy side + * **BlenderShadowSettings** sets the cascade_size on the bevy side to match the one configured in Blender + + If these components are present in your gltf file, they will be handled automatically by this crate, will be ignored otherwise. + ## Examples https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/basic @@ -117,9 +127,10 @@ The main branch is compatible with the latest Bevy release, while the branch `be Compatibility of `bevy_gltf_components` versions: | `bevy_gltf_components` | `bevy` | | :-- | :-- | +| `0.5` | `0.13` | | `0.2 - 0.4` | `0.12` | | `0.1` | `0.11` | -| branch `main` | `0.12` | +| branch `main` | `0.13` | | branch `bevy_main` | `main` | diff --git a/crates/bevy_gltf_components/src/blender_settings.rs b/crates/bevy_gltf_components/src/blender_settings.rs new file mode 100644 index 0000000..fe1b83c --- /dev/null +++ b/crates/bevy_gltf_components/src/blender_settings.rs @@ -0,0 +1,8 @@ +use bevy::prelude::*; + +mod lighting; +pub use lighting::*; + +pub(crate) fn plugin(app: &mut App) { + app.add_plugins(lighting::plugin); +} diff --git a/crates/bevy_gltf_components/src/blender_settings/lighting.rs b/crates/bevy_gltf_components/src/blender_settings/lighting.rs new file mode 100644 index 0000000..622c0e1 --- /dev/null +++ b/crates/bevy_gltf_components/src/blender_settings/lighting.rs @@ -0,0 +1,97 @@ +use bevy::pbr::DirectionalLightShadowMap; +use bevy::prelude::*; + +use crate::GltfComponentsSet; + +pub(crate) fn plugin(app: &mut App) { + app.register_type::() + .register_type::() + .register_type::() + .add_systems( + Update, + (process_lights, process_shadowmap, process_background_shader) + .after(GltfComponentsSet::Injection), + ); +} + +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +/// The properties of a light's shadow , to enable controlling per light shadows from Blender +pub struct BlenderLightShadows { + pub enabled: bool, + pub buffer_bias: f32, +} + +/// The background color as described by Blender's [background shader](https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/background.html). +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub struct BlenderBackgroundShader { + pub color: Color, + pub strength: f32, +} + +/// The settings used by EEVEE's [shadow rendering](https://docs.blender.org/manual/en/latest/render/eevee/render_settings/shadows.html). +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub struct BlenderShadowSettings { + pub cascade_size: usize, +} + +fn process_lights( + mut directional_lights: Query< + (&mut DirectionalLight, Option<&BlenderLightShadows>), + Added, + >, + mut spot_lights: Query<(&mut SpotLight, Option<&BlenderLightShadows>), Added>, + mut point_lights: Query<(&mut PointLight, Option<&BlenderLightShadows>), Added>, +) { + for (mut light, blender_light_shadows) in directional_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } else { + light.shadows_enabled = true; + } + } + for (mut light, blender_light_shadows) in spot_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } else { + light.shadows_enabled = true; + } + } + + for (mut light, blender_light_shadows) in point_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } else { + light.shadows_enabled = true; + } + } +} + +fn process_shadowmap( + shadowmaps: Query<&BlenderShadowSettings, Added>, + mut commands: Commands, +) { + for shadowmap in shadowmaps.iter() { + commands.insert_resource(DirectionalLightShadowMap { + size: shadowmap.cascade_size, + }); + } +} + +fn process_background_shader( + background_shaders: Query<&BlenderBackgroundShader, Added>, + mut commands: Commands, +) { + for background_shader in background_shaders.iter() { + commands.insert_resource(AmbientLight { + color: background_shader.color, + // Just a guess, see + brightness: background_shader.strength * 400.0, + }); + } +} diff --git a/crates/bevy_gltf_components/src/lib.rs b/crates/bevy_gltf_components/src/lib.rs index 75cd910..ccba12f 100644 --- a/crates/bevy_gltf_components/src/lib.rs +++ b/crates/bevy_gltf_components/src/lib.rs @@ -7,11 +7,18 @@ pub use ronstring_to_reflect_component::*; pub mod process_gltfs; pub use process_gltfs::*; +pub mod blender_settings; + use bevy::{ app::Startup, - ecs::system::{Res, Resource}, + ecs::{ + component::Component, + reflect::ReflectComponent, + system::{Res, Resource}, + }, log::warn, prelude::{App, IntoSystemConfigs, Plugin, SystemSet, Update}, + reflect::Reflect, }; /// A Bevy plugin for extracting components from gltf files and automatically adding them to the relevant entities @@ -47,6 +54,11 @@ use bevy::{ ///} /// ``` +/// this is a flag component to tag a processed gltf, to avoid processing things multiple times +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct GltfProcessed; + #[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] /// systemset to order your systems after the component injection when needed pub enum GltfComponentsSet { @@ -76,13 +88,15 @@ fn check_for_legacy_mode(gltf_components_config: Res) { impl Plugin for ComponentsFromGltfPlugin { fn build(&self, app: &mut App) { - app.insert_resource(GltfComponentsConfig { - legacy_mode: self.legacy_mode, - }) - .add_systems(Startup, check_for_legacy_mode) - .add_systems( - Update, - (add_components_from_gltf_extras).in_set(GltfComponentsSet::Injection), - ); + app.add_plugins(blender_settings::plugin) + .register_type::() + .insert_resource(GltfComponentsConfig { + legacy_mode: self.legacy_mode, + }) + .add_systems(Startup, check_for_legacy_mode) + .add_systems( + Update, + (add_components_from_gltf_extras).in_set(GltfComponentsSet::Injection), + ); } } diff --git a/crates/bevy_gltf_components/src/process_gltfs.rs b/crates/bevy_gltf_components/src/process_gltfs.rs index bce34bc..a37f537 100644 --- a/crates/bevy_gltf_components/src/process_gltfs.rs +++ b/crates/bevy_gltf_components/src/process_gltfs.rs @@ -2,7 +2,7 @@ use bevy::{ core::Name, ecs::{ entity::Entity, - query::Added, + query::{Added, Without}, reflect::{AppTypeRegistry, ReflectComponent}, world::World, }, @@ -13,12 +13,12 @@ use bevy::{ utils::HashMap, }; -use crate::{ronstring_to_reflect_component, GltfComponentsConfig}; +use crate::{ronstring_to_reflect_component, GltfComponentsConfig, GltfProcessed}; /// main function: injects components into each entity in gltf files that have `gltf_extras`, using reflection pub fn add_components_from_gltf_extras(world: &mut World) { let mut extras = - world.query_filtered::<(Entity, &Name, &GltfExtras, &Parent), Added>(); + world.query_filtered::<(Entity, &Name, &GltfExtras, &Parent), (Added, Without)>(); let mut entity_components: HashMap, TypeRegistration)>> = HashMap::new(); @@ -32,6 +32,7 @@ pub fn add_components_from_gltf_extras(world: &mut World) { let type_registry: &AppTypeRegistry = world.resource(); let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component( &extra.value, &type_registry, @@ -68,20 +69,29 @@ pub fn add_components_from_gltf_extras(world: &mut World) { } for (entity, components) in entity_components { + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.clone(); + let type_registry = type_registry.read(); + if !components.is_empty() { debug!("--entity {:?}, components {}", entity, components.len()); } for (component, type_registration) in components { - let mut entity_mut = world.entity_mut(entity); debug!( "------adding {} {:?}", component.get_represented_type_info().unwrap().type_path(), component ); - type_registration - .data::() - .unwrap() - .insert(&mut entity_mut, &*component); // TODO: how can we insert any additional components "by hand" here ? + + { + let mut entity_mut = world.entity_mut(entity); + type_registration + .data::() + .expect("Unable to reflect component") + .insert(&mut entity_mut, &*component, &type_registry); + + entity_mut.insert(GltfProcessed); // this is how can we insert any additional components + } } } } diff --git a/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs b/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs index 018770f..dc095f5 100644 --- a/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs +++ b/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs @@ -110,7 +110,8 @@ pub fn ronstring_to_reflect_component( println!("serialized Component {}", serialized);*/ debug!("component data ron string {}", ron_string); - let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()).unwrap(); + let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()) + .expect("deserialzer should have been generated from string"); let reflect_deserializer = UntypedReflectDeserializer::new(type_registry); let component = reflect_deserializer .deserialize(&mut deserializer) @@ -123,7 +124,6 @@ pub fn ronstring_to_reflect_component( debug!("component {:?}", component); debug!("real type {:?}", component.get_represented_type_info()); - components.push((component, type_registration.clone())); debug!("found type registration for {}", capitalized_type_name); } else { diff --git a/crates/bevy_gltf_save_load/Cargo.toml b/crates/bevy_gltf_save_load/Cargo.toml index 0d4ebfa..2da1390 100644 --- a/crates/bevy_gltf_save_load/Cargo.toml +++ b/crates/bevy_gltf_save_load/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gltf_save_load" -version = "0.3.0" +version = "0.4.0" authors = ["Mark 'kaosat-dev' Moissette"] description = "Save & load your bevy games" homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" @@ -13,10 +13,10 @@ license = "MIT OR Apache-2.0" [lints] workspace = true -[dev-dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } - [dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } -bevy_gltf_blueprints = "0.8" -#bevy_gltf_blueprints = { path = "../bevy_gltf_blueprints" } +bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } +#bevy_gltf_blueprints = "0.9" +bevy_gltf_blueprints = { version = "0.9", path = "../bevy_gltf_blueprints" } + +[dev-dependencies] +bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] } diff --git a/crates/bevy_gltf_save_load/README.md b/crates/bevy_gltf_save_load/README.md index 3565da3..1141132 100644 --- a/crates/bevy_gltf_save_load/README.md +++ b/crates/bevy_gltf_save_load/README.md @@ -34,9 +34,9 @@ Here's a minimal usage example: ```toml # Cargo.toml [dependencies] -bevy="0.12" -bevy_gltf_save_load = "0.3" -bevy_gltf_blueprints = "0.6" // also needed +bevy="0.13" +bevy_gltf_save_load = "0.4" +bevy_gltf_blueprints = "0.9" // also needed ``` ```rust no_run @@ -142,7 +142,11 @@ Add the following to your `[dependencies]` section in `Cargo.toml`: ```toml bevy_gltf_save_load = "0.3" +<<<<<<< HEAD +bevy_gltf_blueprints = "0.8" // also needed, as bevy_gltf_save_load does not re-export it at this time +======= bevy_gltf_blueprints = "0.6" // also needed, as bevy_gltf_save_load does not re-export it at this time +>>>>>>> 9cb9dda5d35c635d367fa81ca1a6c752cda9bc02 ``` @@ -299,6 +303,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be Compatibility of `bevy_gltf_save_load` versions: | `bevy_gltf_save_load` | `bevy` | | :-- | :-- | +| `0.4 ` | `0.13` | | `0.1 -0.3` | `0.12` | | branch `main` | `0.12` | | branch `bevy_main` | `main` | diff --git a/crates/bevy_gltf_save_load/src/lib.rs b/crates/bevy_gltf_save_load/src/lib.rs index 00c45b9..6a5725f 100644 --- a/crates/bevy_gltf_save_load/src/lib.rs +++ b/crates/bevy_gltf_save_load/src/lib.rs @@ -92,15 +92,15 @@ impl Plugin for SaveLoadPlugin { Update, (unload_world, apply_deferred, load_game) .chain() - .run_if(resource_exists::()) - .run_if(not(resource_exists::())) + .run_if(resource_exists::) + .run_if(not(resource_exists::)) .in_set(LoadingSet::Load), ) .add_systems( Update, (load_static, apply_deferred, cleanup_loaded_scene) .chain() - .run_if(resource_exists::()) + .run_if(resource_exists::) // .run_if(in_state(AppState::LoadingGame)) .in_set(LoadingSet::Load), ); diff --git a/crates/bevy_registry_export/Cargo.toml b/crates/bevy_registry_export/Cargo.toml index b442990..2471063 100644 --- a/crates/bevy_registry_export/Cargo.toml +++ b/crates/bevy_registry_export/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_registry_export" -version = "0.2.0" +version = "0.3.0" authors = ["Mark 'kaosat-dev' Moissette", "Pascal 'Killercup' Hertleif"] 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_workflow" @@ -10,12 +10,12 @@ categories = ["game-development"] edition = "2021" license = "MIT OR Apache-2.0" -[dev-dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } - [dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_scene"] } -bevy_reflect = { version = "0.12.1", default-features = false } -bevy_app = { version = "0.12.1", default-features = false, features = ["bevy_reflect"] } -bevy_ecs = { version = "0.12.1", default-features = false, features = ["bevy_reflect"] } -serde_json = "1.0.108" \ No newline at end of file +bevy = { version = "0.13", default-features = false, features = ["bevy_scene"] } +bevy_reflect = { version = "0.13", default-features = false } +bevy_app = { version = "0.13", default-features = false, features = ["bevy_reflect"] } +bevy_ecs = { version = "0.13", default-features = false, features = ["bevy_reflect"] } +serde_json = "1.0.108" + +[dev-dependencies] +bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_registry_export/README.md b/crates/bevy_registry_export/README.md index 183b764..6fe601b 100644 --- a/crates/bevy_registry_export/README.md +++ b/crates/bevy_registry_export/README.md @@ -17,8 +17,8 @@ Here's a minimal usage example: ```toml # Cargo.toml [dependencies] -bevy="0.12" -bevy_registry_export = "0.2" +bevy="0.13" +bevy_registry_export = "0.3" ``` ```rust no_run @@ -44,7 +44,7 @@ take a look at the [example]('https://github.com/kaosat-dev/Blender_bevy_compone Add the following to your `[dependencies]` section in `Cargo.toml`: ```toml -bevy_registry_export = "0.2" +bevy_registry_export = "0.3" ``` @@ -112,6 +112,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be Compatibility of `bevy_registry_export` versions: | `bevy_registry_export` | `bevy` | `bevy_components (Blender add-on)` | | :-- | :-- |:-- | +| `0.3 ` | `0.13` | `0.3` | | `0.2 ` | `0.12` | `0.3` | | `0.1 ` | `0.12` | `0.1 -0.2` | | branch `main` | `0.12` | `0.1` | diff --git a/crates/bevy_registry_export/src/export_types.rs b/crates/bevy_registry_export/src/export_types.rs index cb0872d..8a06ebf 100644 --- a/crates/bevy_registry_export/src/export_types.rs +++ b/crates/bevy_registry_export/src/export_types.rs @@ -1,4 +1,4 @@ -use std::fs::File; +use std::{fs::File, path::Path}; use bevy::log::info; use bevy_ecs::{ @@ -8,14 +8,17 @@ use bevy_ecs::{ use bevy_reflect::{TypeInfo, TypeRegistration, VariantInfo}; // TypePath // DynamicTypePath use serde_json::{json, Map, Value}; -use crate::ExportComponentsConfig; +use crate::{AssetRoot, ExportComponentsConfig}; pub fn export_types(world: &mut World) { let config = world .get_resource::() .expect("ExportComponentsConfig should exist at this stage"); - let writer = File::create(&config.save_path).expect("should have created schema file"); + let asset_root = world.resource::(); + let registry_save_path = Path::join(&asset_root.0, &config.save_path); + println!("registry_save_path {}", registry_save_path.display()); + let writer = File::create(registry_save_path).expect("should have created schema file"); let types = world.resource_mut::(); let types = types.read(); diff --git a/crates/bevy_registry_export/src/lib.rs b/crates/bevy_registry_export/src/lib.rs index fa8e29d..eef5136 100644 --- a/crates/bevy_registry_export/src/lib.rs +++ b/crates/bevy_registry_export/src/lib.rs @@ -6,6 +6,7 @@ use bevy_ecs::system::Resource; pub use export_types::*; use bevy::{ + asset::AssetPlugin, prelude::{App, Plugin}, scene::SceneFilter, }; @@ -29,20 +30,44 @@ pub struct ExportRegistryPlugin { impl Default for ExportRegistryPlugin { fn default() -> Self { Self { - component_filter: SceneFilter::default(), // unused for now - resource_filter: SceneFilter::default(), // unused for now - save_path: PathBuf::from("assets/registry.json"), + component_filter: SceneFilter::default(), // unused for now + resource_filter: SceneFilter::default(), // unused for now + save_path: PathBuf::from("registry.json"), // relative to assets folder } } } impl Plugin for ExportRegistryPlugin { fn build(&self, app: &mut App) { - app.insert_resource(ExportComponentsConfig { - save_path: self.save_path.clone(), - component_filter: self.component_filter.clone(), - resource_filter: self.resource_filter.clone(), - }) - .add_systems(Startup, export_types); + app.register_asset_root() + .insert_resource(ExportComponentsConfig { + save_path: self.save_path.clone(), + component_filter: self.component_filter.clone(), + resource_filter: self.resource_filter.clone(), + }) + .add_systems(Startup, export_types); } } + +trait RegistryExportApp { + fn register_asset_root(&mut self) -> &mut Self; +} +impl RegistryExportApp for App { + fn register_asset_root(&mut self) -> &mut Self { + let asset_plugin = get_asset_plugin(self); + let path_str = asset_plugin.file_path.clone(); + let path = PathBuf::from(path_str); + self.insert_resource(AssetRoot(path)) + } +} + +fn get_asset_plugin(app: &App) -> &AssetPlugin { + let asset_plugins: Vec<&AssetPlugin> = app.get_added_plugins(); + asset_plugins.into_iter().next().expect(ASSET_ERROR) +} + +const ASSET_ERROR: &str = "Bevy_registry_export requires access to the Bevy asset plugin. \ + Please add `ExportRegistryPlugin` after `AssetPlugin`, which is commonly added as part of the `DefaultPlugins`"; + +#[derive(Debug, Clone, PartialEq, Eq, Hash, Resource)] +pub(crate) struct AssetRoot(pub(crate) PathBuf); diff --git a/examples/bevy_gltf_blueprints/animation/Cargo.toml b/examples/bevy_gltf_blueprints/animation/Cargo.toml index ee87ff2..3f8a3b2 100644 --- a/examples/bevy_gltf_blueprints/animation/Cargo.toml +++ b/examples/bevy_gltf_blueprints/animation/Cargo.toml @@ -5,11 +5,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } rand = "0.8.5" diff --git a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs b/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs index d8651fa..fcf711b 100644 --- a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs @@ -1,4 +1,6 @@ -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning, Player}; +use bevy_gltf_worlflow_examples_common_rapier::{ + assets::GameAssets, GameState, InAppRunning, Player, +}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; use std::time::Duration; @@ -43,12 +45,12 @@ pub fn setup_game( } pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; @@ -165,11 +167,11 @@ pub fn animation_control( mut animation_players: Query<&mut AnimationPlayer>, - keycode: Res>, + keycode: Res>, // mut entities_with_animations : Query<(&mut AnimationPlayer, &mut Animations)>, ) { // robots - if keycode.just_pressed(KeyCode::B) { + if keycode.just_pressed(KeyCode::KeyB) { for (link, animations) in animated_enemies.iter() { let mut animation_player = animation_players.get_mut(link.0).unwrap(); let anim_name = "Scan"; @@ -187,7 +189,7 @@ pub fn animation_control( } // foxes - if keycode.just_pressed(KeyCode::W) { + if keycode.just_pressed(KeyCode::KeyW) { for (link, animations) in animated_foxes.iter() { let mut animation_player = animation_players.get_mut(link.0).unwrap(); let anim_name = "Walk"; @@ -204,7 +206,7 @@ pub fn animation_control( } } - if keycode.just_pressed(KeyCode::X) { + if keycode.just_pressed(KeyCode::KeyX) { for (link, animations) in animated_foxes.iter() { let mut animation_player = animation_players.get_mut(link.0).unwrap(); let anim_name = "Run"; @@ -221,7 +223,7 @@ pub fn animation_control( } } - if keycode.just_pressed(KeyCode::C) { + if keycode.just_pressed(KeyCode::KeyC) { for (link, animations) in animated_foxes.iter() { let mut animation_player = animation_players.get_mut(link.0).unwrap(); let anim_name = "Survey"; diff --git a/examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs index 749eb36..2b72d42 100644 --- a/examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,22 +98,10 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::L) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_blueprints/animation/src/game/mod.rs b/examples/bevy_gltf_blueprints/animation/src/game/mod.rs index bb44b89..2520bad 100644 --- a/examples/bevy_gltf_blueprints/animation/src/game/mod.rs +++ b/examples/bevy_gltf_blueprints/animation/src/game/mod.rs @@ -5,7 +5,7 @@ pub mod in_main_menu; pub use in_main_menu::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] diff --git a/examples/bevy_gltf_blueprints/animation/src/main.rs b/examples/bevy_gltf_blueprints/animation/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_gltf_blueprints/animation/src/main.rs +++ b/examples/bevy_gltf_blueprints/animation/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_gltf_blueprints/basic/Cargo.toml b/examples/bevy_gltf_blueprints/basic/Cargo.toml index 9b83cc8..bb9cb2f 100644 --- a/examples/bevy_gltf_blueprints/basic/Cargo.toml +++ b/examples/bevy_gltf_blueprints/basic/Cargo.toml @@ -5,11 +5,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } rand = "0.8.5" diff --git a/examples/bevy_gltf_blueprints/basic/assets/basic.blend b/examples/bevy_gltf_blueprints/basic/assets/basic.blend index d92ce80..e49cf29 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/basic.blend and b/examples/bevy_gltf_blueprints/basic/assets/basic.blend differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/World.glb b/examples/bevy_gltf_blueprints/basic/assets/models/World.glb index 642b155..4ba597a 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/World.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/World.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb index 72ff5ca..246c390 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb index 9d40674..93831ec 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb index 4ff291b..fc2fa99 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb index bdddd17..74f840f 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb index 4643320..6ef1ceb 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb index 3aa5e5d..ebc35e6 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb index 7a7020b..4058c42 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb index 891122c..ca08896 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb index a7ef15f..1e74288 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb index b5937bb..fba53e7 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb and b/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb differ diff --git a/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs b/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs index 390a5f9..3af11d5 100644 --- a/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs @@ -1,7 +1,6 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; - +use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -40,12 +39,12 @@ pub fn setup_game( struct UnregisteredComponent; pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; @@ -83,12 +82,12 @@ pub fn spawn_test( } pub fn spawn_test_unregisted_components( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::U) { + if keycode.just_pressed(KeyCode::KeyU) { let world = game_world.single_mut(); let world = world.1[0]; diff --git a/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs index c1a4b8b..c131150 100644 --- a/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,24 +98,24 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, + keycode: Res>, mut next_app_state: ResMut>, // mut next_game_state: ResMut>, // mut save_requested_events: EventWriter, // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); // next_game_state.set(GameState::None); } - if keycode.just_pressed(KeyCode::L) { + if keycode.just_pressed(KeyCode::KeyL) { next_app_state.set(AppState::AppLoading); // load_requested_events.send(LoadRequest { path: "toto".into() }) } - if keycode.just_pressed(KeyCode::S) { + if keycode.just_pressed(KeyCode::KeyS) { // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_blueprints/basic/src/game/mod.rs b/examples/bevy_gltf_blueprints/basic/src/game/mod.rs index b236141..3436f29 100644 --- a/examples/bevy_gltf_blueprints/basic/src/game/mod.rs +++ b/examples/bevy_gltf_blueprints/basic/src/game/mod.rs @@ -5,7 +5,7 @@ pub mod in_main_menu; pub use in_main_menu::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; pub struct GamePlugin; impl Plugin for GamePlugin { diff --git a/examples/bevy_gltf_blueprints/basic/src/main.rs b/examples/bevy_gltf_blueprints/basic/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_gltf_blueprints/basic/src/main.rs +++ b/examples/bevy_gltf_blueprints/basic/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml b/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml index 144cf0d..16b4878 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml @@ -5,11 +5,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_xpbd_3d = "0.3" -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } -rand = "0.8.5" +bevy_gltf_worlflow_examples_common_xpbd = { path = "../../common_xpbd" } +bevy_xpbd_3d = "0.4" +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs index 0571ebc..0b481ac 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs @@ -1,18 +1,12 @@ -pub mod physics; -pub use physics::*; - use bevy::prelude::*; use bevy_gltf_blueprints::*; pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { - app.add_plugins(( - PhysicsPlugin, - BlueprintsPlugin { - library_folder: "models/library".into(), - ..Default::default() - }, - )); + app.add_plugins((BlueprintsPlugin { + library_folder: "models/library".into(), + ..Default::default() + },)); } } diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/controls.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/controls.rs deleted file mode 100644 index 1936001..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/controls.rs +++ /dev/null @@ -1,14 +0,0 @@ -use bevy::log::info; -use bevy::{prelude::ResMut, time::Time}; -use bevy_xpbd_3d::prelude::Physics; -use bevy_xpbd_3d::prelude::*; - -pub fn pause_physics(mut time: ResMut>) { - info!("pausing physics"); - time.pause(); -} - -pub fn resume_physics(mut time: ResMut>) { - info!("unpausing physics"); - time.unpause(); -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/mod.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/mod.rs deleted file mode 100644 index 702294c..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/mod.rs +++ /dev/null @@ -1,28 +0,0 @@ -pub mod physics_replace_proxies; -pub use physics_replace_proxies::*; - -pub mod utils; - -pub mod controls; -pub use controls::*; - -use bevy::prelude::*; -use bevy_xpbd_3d::prelude::*; - -use bevy_gltf_blueprints::GltfBlueprintsSet; -use bevy_gltf_worlflow_examples_common::GameState; - -pub struct PhysicsPlugin; -impl Plugin for PhysicsPlugin { - fn build(&self, app: &mut App) { - app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default())) - .register_type::() - .register_type::() - .add_systems( - Update, - physics_replace_proxies.after(GltfBlueprintsSet::AfterSpawn), - ) - .add_systems(OnEnter(GameState::InGame), resume_physics) - .add_systems(OnExit(GameState::InGame), pause_physics); - } -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs index 64559c5..3fa60da 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs @@ -1,10 +1,7 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; - -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; -// use bevy_rapier3d::prelude::Velocity; +use bevy_gltf_worlflow_examples_common_xpbd::{assets::GameAssets, GameState, InAppRunning}; use bevy_xpbd_3d::prelude::*; - use rand::Rng; pub fn setup_game( @@ -13,7 +10,6 @@ pub fn setup_game( models: Res>, mut next_game_state: ResMut>, ) { - println!("setting up all stuff"); commands.insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, @@ -39,12 +35,12 @@ pub fn setup_game( } pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs index c1a4b8b..212d1fc 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_xpbd::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,24 +98,10 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::L) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs index 438f85e..8aff7d6 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs @@ -5,7 +5,7 @@ pub mod in_main_menu; pub use in_main_menu::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_xpbd::{AppState, GameState}; pub struct GamePlugin; impl Plugin for GamePlugin { diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs index 8fca426..2de0274 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs +++ b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_xpbd::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_gltf_blueprints/materials/Cargo.toml b/examples/bevy_gltf_blueprints/materials/Cargo.toml index 7a4098d..a51a690 100644 --- a/examples/bevy_gltf_blueprints/materials/Cargo.toml +++ b/examples/bevy_gltf_blueprints/materials/Cargo.toml @@ -5,11 +5,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } -rand = "0.8.5" +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs b/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs index 2338956..e5fc8b8 100644 --- a/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; +use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -11,7 +11,6 @@ pub fn setup_game( models: Res>, mut next_game_state: ResMut>, ) { - println!("setting up all stuff"); commands.insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, @@ -41,12 +40,12 @@ pub fn setup_game( struct UnregisteredComponent; pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; @@ -66,7 +65,7 @@ pub fn spawn_test( let new_entity = commands .spawn(( BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), + blueprint: BlueprintName("Watermelon2".to_string()), ..Default::default() }, bevy::prelude::Name::from(format!("test{}", name_index)), @@ -82,47 +81,3 @@ pub fn spawn_test( commands.entity(world).add_child(new_entity); } } - -pub fn spawn_test_unregisted_components( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::U) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - UnregisteredComponent, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs index c1a4b8b..2b72d42 100644 --- a/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,24 +98,10 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::L) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_blueprints/materials/src/game/mod.rs b/examples/bevy_gltf_blueprints/materials/src/game/mod.rs index b236141..a8e8352 100644 --- a/examples/bevy_gltf_blueprints/materials/src/game/mod.rs +++ b/examples/bevy_gltf_blueprints/materials/src/game/mod.rs @@ -5,18 +5,15 @@ pub mod in_main_menu; pub use in_main_menu::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { - app.add_systems( - Update, - (spawn_test, spawn_test_unregisted_components).run_if(in_state(GameState::InGame)), - ) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); + app.add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) + .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) + .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) + .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) + .add_systems(OnEnter(AppState::AppRunning), setup_game); } } diff --git a/examples/bevy_gltf_blueprints/materials/src/main.rs b/examples/bevy_gltf_blueprints/materials/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_gltf_blueprints/materials/src/main.rs +++ b/examples/bevy_gltf_blueprints/materials/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml index 563fbe2..bea96b6 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml @@ -5,11 +5,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } -rand = "0.8.5" +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend index bf43cf0..0be781b 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend index 5ff26b8..351859a 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend index d2412f8..f96dccc 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend index 4c36a78..03670c6 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb index 4227c4e..e4082a9 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb index 25a1707..533fb15 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb index 5309d8a..4a97a1c 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb index 30b813a..d188423 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb index dddd157..77f6a86 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb index 40bc7ac..3c6a3fb 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb index 1fac637..11be997 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb index 5065163..5cfddcf 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb index f6e2313..855aaac 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb index 14eface..ebe01c3 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb index 0735c7f..7b70311 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb index 0fc1bd4..d255ede 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb index 4fa20ae..b6443ab 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb index 9c52f1e..4036848 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb index 1b2df92..a98feaf 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb index 02ad4d5..0da4a34 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb index 33a8bfc..02a738e 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb index 36b6ed4..5c67244 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb index 9218f08..31f44c6 100644 Binary files a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb and b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb differ diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs index 2338956..75be98a 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; +use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -11,7 +11,6 @@ pub fn setup_game( models: Res>, mut next_game_state: ResMut>, ) { - println!("setting up all stuff"); commands.insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, @@ -41,12 +40,12 @@ pub fn setup_game( struct UnregisteredComponent; pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; @@ -82,47 +81,3 @@ pub fn spawn_test( commands.entity(world).add_child(new_entity); } } - -pub fn spawn_test_unregisted_components( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::U) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - UnregisteredComponent, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs index c1a4b8b..2b72d42 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,24 +98,10 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::L) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs index 7fa6f1a..41d5c90 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs @@ -1,6 +1,8 @@ use bevy::{gltf::Gltf, prelude::*}; use bevy_gltf_blueprints::GameWorldTag; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning, Player}; +use bevy_gltf_worlflow_examples_common_rapier::{ + assets::GameAssets, GameState, InAppRunning, Player, +}; use bevy_rapier3d::prelude::*; #[derive(Component, Reflect, Default, Debug)] diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs index 3ecdb4f..554a044 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs @@ -8,16 +8,13 @@ pub mod level_transitions; pub use level_transitions::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { app.add_plugins(LevelsPlugin) - .add_systems( - Update, - (spawn_test, spawn_test_unregisted_components).run_if(in_state(GameState::InGame)), - ) + .add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs +++ b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_gltf_components/basic/Cargo.toml b/examples/bevy_gltf_components/basic/Cargo.toml index b0ef625..ab6eb9d 100644 --- a/examples/bevy_gltf_components/basic/Cargo.toml +++ b/examples/bevy_gltf_components/basic/Cargo.toml @@ -5,9 +5,6 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_components = { path = "../../../crates/bevy_gltf_components" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_editor_pls = { version = "0.6" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } diff --git a/examples/bevy_gltf_components/basic/assets/basic.blend b/examples/bevy_gltf_components/basic/assets/basic.blend index 593df09..0447205 100644 Binary files a/examples/bevy_gltf_components/basic/assets/basic.blend and b/examples/bevy_gltf_components/basic/assets/basic.blend differ diff --git a/examples/bevy_gltf_components/basic/src/main.rs b/examples/bevy_gltf_components/basic/src/main.rs index 39035d3..40df6cf 100644 --- a/examples/bevy_gltf_components/basic/src/main.rs +++ b/examples/bevy_gltf_components/basic/src/main.rs @@ -1,7 +1,6 @@ use bevy::{gltf::Gltf, prelude::*}; -use bevy_editor_pls::prelude::*; use bevy_gltf_components::ComponentsFromGltfPlugin; -use bevy_gltf_worlflow_examples_common::CorePlugin; +use bevy_gltf_worlflow_examples_common_rapier::CorePlugin; mod test_components; use test_components::*; @@ -61,14 +60,14 @@ fn main() { .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), // editor - EditorPlugin::default(), + // EditorPlugin::default(), // physics // our custom plugins ComponentsFromGltfPlugin::default(), CorePlugin, // reusable plugins ComponentsTestPlugin, // Showcases different type of components /structs )) - .add_state::() + .init_state::() .add_systems(Startup, setup) .add_systems(Update, (spawn_level.run_if(in_state(AppState::Loading)),)) .run(); diff --git a/examples/bevy_gltf_save_load/basic/Cargo.toml b/examples/bevy_gltf_save_load/basic/Cargo.toml index 8685e79..e1afba2 100644 --- a/examples/bevy_gltf_save_load/basic/Cargo.toml +++ b/examples/bevy_gltf_save_load/basic/Cargo.toml @@ -5,14 +5,12 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" -bevy_gltf_blueprints = "0.7" +bevy = { version = "0.13", features = ["dynamic_linking"] } +bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } bevy_gltf_save_load = { path = "../../../crates/bevy_gltf_save_load" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } -rand = "0.8.5" -serde_json="1.0.108" -serde="1.0.193" \ No newline at end of file +serde_json = "1.0.108" +serde = "1.0.193" +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_save_load/basic/src/core/mod.rs b/examples/bevy_gltf_save_load/basic/src/core/mod.rs index 6d856d8..c6173bb 100644 --- a/examples/bevy_gltf_save_load/basic/src/core/mod.rs +++ b/examples/bevy_gltf_save_load/basic/src/core/mod.rs @@ -6,7 +6,7 @@ use bevy::{ }; use bevy_gltf_blueprints::*; use bevy_gltf_save_load::*; -use bevy_gltf_worlflow_examples_common::{CameraTrackingOffset, Pickable}; +use bevy_gltf_worlflow_examples_common_rapier::{CameraTrackingOffset, Pickable}; use bevy_rapier3d::dynamics::Velocity; use std::any::TypeId; diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game.rs b/examples/bevy_gltf_save_load/basic/src/game/in_game.rs index 6bcedba..3322e46 100644 --- a/examples/bevy_gltf_save_load/basic/src/game/in_game.rs +++ b/examples/bevy_gltf_save_load/basic/src/game/in_game.rs @@ -1,7 +1,7 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag, Library, NoInBlueprint}; use bevy_gltf_save_load::{Dynamic, DynamicEntitiesRoot, StaticEntitiesRoot}; -use bevy_gltf_worlflow_examples_common::{GameState, InAppRunning, Player}; +use bevy_gltf_worlflow_examples_common_rapier::{GameState, InAppRunning, Player}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -60,16 +60,16 @@ pub fn unload_world(mut commands: Commands, gameworlds: Query>) -> bool { - keycode.just_pressed(KeyCode::N) +pub fn should_reset(keycode: Res>) -> bool { + keycode.just_pressed(KeyCode::KeyN) } pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut dynamic_entities_world: Query>, mut commands: Commands, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = dynamic_entities_world.single_mut(); let mut rng = rand::thread_rng(); @@ -109,12 +109,12 @@ pub fn spawn_test( struct UnregisteredComponent; pub fn spawn_test_unregisted_components( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut dynamic_entities_world: Query>, ) { - if keycode.just_pressed(KeyCode::U) { + if keycode.just_pressed(KeyCode::KeyU) { let world = dynamic_entities_world.single_mut(); let mut rng = rand::thread_rng(); @@ -152,13 +152,13 @@ pub fn spawn_test_unregisted_components( } pub fn spawn_test_parenting( - keycode: Res>, + keycode: Res>, players: Query>, mut commands: Commands, names: Query<(Entity, &Name)>, ) { - if keycode.just_pressed(KeyCode::P) { + if keycode.just_pressed(KeyCode::KeyP) { let mut rng = rand::thread_rng(); let range = 5.5; let x: f32 = rng.gen_range(-range..range); diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs b/examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs index 7f938c0..76474de 100644 --- a/examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs +++ b/examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs @@ -1,13 +1,11 @@ -use bevy::{core_pipeline::clear_color::ClearColorConfig, prelude::*}; -use bevy_gltf_worlflow_examples_common::InGameLoading; +use bevy::prelude::*; +use bevy_gltf_worlflow_examples_common_rapier::InGameLoading; pub fn setup_loading_screen(mut commands: Commands) { commands.spawn(( Camera2dBundle { - camera_2d: Camera2d { - clear_color: ClearColorConfig::Custom(Color::BLACK), - }, camera: Camera { + clear_color: ClearColorConfig::Custom(Color::BLACK), // renders after / on top of the main camera order: 2, ..default() diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs b/examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs index 8a48a9a..f5a815d 100644 --- a/examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs +++ b/examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs @@ -1,5 +1,5 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::InGameSaving; +use bevy_gltf_worlflow_examples_common_rapier::InGameSaving; pub fn setup_saving_screen(mut commands: Commands) { commands.spawn(( diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs b/examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs index f449eec..6cea380 100644 --- a/examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs +++ b/examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -92,24 +101,14 @@ pub fn teardown_main_menu(in_main_menu: Query>, mut com } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); } - if keycode.just_pressed(KeyCode::L) { + if keycode.just_pressed(KeyCode::KeyL) { next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_gltf_save_load/basic/src/game/mod.rs b/examples/bevy_gltf_save_load/basic/src/game/mod.rs index f30e6fe..a119802 100644 --- a/examples/bevy_gltf_save_load/basic/src/game/mod.rs +++ b/examples/bevy_gltf_save_load/basic/src/game/mod.rs @@ -1,5 +1,5 @@ pub mod in_game; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; pub use in_game::*; pub mod in_main_menu; @@ -16,19 +16,19 @@ use bevy_gltf_save_load::{LoadRequest, LoadingFinished, SaveRequest, SavingFinis pub fn request_save( mut save_requests: EventWriter, - keycode: Res>, + keycode: Res>, current_state: Res>, mut next_game_state: ResMut>, ) { - if keycode.just_pressed(KeyCode::S) + if keycode.just_pressed(KeyCode::KeyS) && (current_state.get() != &GameState::InLoading) && (current_state.get() != &GameState::InSaving) { next_game_state.set(GameState::InSaving); save_requests.send(SaveRequest { path: "save.scn.ron".into(), - }) + }); } } @@ -43,18 +43,18 @@ pub fn on_saving_finished( pub fn request_load( mut load_requests: EventWriter, - keycode: Res>, + keycode: Res>, current_state: Res>, mut next_game_state: ResMut>, ) { - if keycode.just_pressed(KeyCode::L) + if keycode.just_pressed(KeyCode::KeyL) && (current_state.get() != &GameState::InLoading) && (current_state.get() != &GameState::InSaving) { next_game_state.set(GameState::InLoading); load_requests.send(LoadRequest { path: "save.scn.ron".into(), - }) + }); } } diff --git a/examples/bevy_gltf_save_load/basic/src/main.rs b/examples/bevy_gltf_save_load/basic/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_gltf_save_load/basic/src/main.rs +++ b/examples/bevy_gltf_save_load/basic/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/bevy_registry_export/basic/Cargo.toml b/examples/bevy_registry_export/basic/Cargo.toml index 800d0d3..346510e 100644 --- a/examples/bevy_registry_export/basic/Cargo.toml +++ b/examples/bevy_registry_export/basic/Cargo.toml @@ -5,12 +5,9 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } bevy_registry_export = { path = "../../../crates/bevy_registry_export" } -bevy_gltf_worlflow_examples_common = { path = "../../common" } - -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } rand = "0.8.5" diff --git a/examples/bevy_registry_export/basic/assets/registry.json b/examples/bevy_registry_export/basic/assets/registry.json index 88e3b13..879ccd1 100644 --- a/examples/bevy_registry_export/basic/assets/registry.json +++ b/examples/bevy_registry_export/basic/assets/registry.json @@ -71,6 +71,19 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_animation::VariableCurve" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, "alloc::vec::Vec": { "isComponent": false, "isResource": false, @@ -84,16 +97,16 @@ "type": "array", "typeInfo": "List" }, - "alloc::vec::Vec": { + "alloc::vec::Vec": { "isComponent": false, "isResource": false, "items": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, "short_name": "Vec", - "title": "alloc::vec::Vec", + "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -123,6 +136,45 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Quat" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, "bevy_animation::AnimationClip": { "additionalProperties": false, "isComponent": false, @@ -179,6 +231,116 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_animation::Interpolation": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Linear", + "Step", + "CubicSpline" + ], + "short_name": "Interpolation", + "title": "bevy_animation::Interpolation", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_animation::Keyframes": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Rotation", + "title": "Rotation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Translation", + "title": "Translation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Scale", + "title": "Scale", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Weights", + "title": "Weights", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Keyframes", + "title": "bevy_animation::Keyframes", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_animation::VariableCurve": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "interpolation": { + "type": { + "$ref": "#/$defs/bevy_animation::Interpolation" + } + }, + "keyframe_timestamps": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "keyframes": { + "type": { + "$ref": "#/$defs/bevy_animation::Keyframes" + } + } + }, + "required": [ + "keyframe_timestamps", + "keyframes", + "interpolation" + ], + "short_name": "VariableCurve", + "title": "bevy_animation::VariableCurve", + "type": "object", + "typeInfo": "Struct" + }, "bevy_asset::handle::Handle<()>": { "isComponent": true, "isResource": false, @@ -977,7 +1139,7 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::handle::Handle": { + "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, "oneOf": [ @@ -1000,7 +1162,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" + "$ref": "#/$defs/bevy_asset::id::AssetId" } } ], @@ -1010,8 +1172,8 @@ "typeInfo": "Tuple" } ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", + "short_name": "Handle", + "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, @@ -2019,7 +2181,7 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::id::AssetId": { + "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, "oneOf": [ @@ -2060,8 +2222,8 @@ "typeInfo": "Struct" } ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", + "short_name": "AssetId", + "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, @@ -2111,6 +2273,152 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_asset::path::AssetPath<'static>": { + "isComponent": false, + "isResource": false, + "short_name": "AssetPath<'static>", + "title": "bevy_asset::path::AssetPath<'static>", + "type": "object", + "typeInfo": "Value" + }, + "bevy_audio::audio::DefaultSpatialScale": { + "isComponent": false, + "isResource": true, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "DefaultSpatialScale", + "title": "bevy_audio::audio::DefaultSpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_audio::audio::GlobalVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "properties": { + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "volume" + ], + "short_name": "GlobalVolume", + "title": "bevy_audio::audio::GlobalVolume", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::PlaybackMode": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Once", + "Loop", + "Despawn", + "Remove" + ], + "short_name": "PlaybackMode", + "title": "bevy_audio::audio::PlaybackMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_audio::audio::PlaybackSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "mode": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::PlaybackMode" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial_scale": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "speed": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "mode", + "volume", + "speed", + "paused", + "spatial" + ], + "short_name": "PlaybackSettings", + "title": "bevy_audio::audio::PlaybackSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::SpatialListener": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "left_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "right_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "left_ear_offset", + "right_ear_offset" + ], + "short_name": "SpatialListener", + "title": "bevy_audio::audio::SpatialListener", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::Volume": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Volume", + "title": "bevy_audio::audio::Volume", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_bevy_registry_export_basic_example::test_components::BasicTest": { "additionalProperties": false, "isComponent": true, @@ -2646,52 +2954,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_core_pipeline::clear_color::ClearColor": { - "isComponent": false, - "isResource": true, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - ], - "short_name": "ClearColor", - "title": "bevy_core_pipeline::clear_color::ClearColor", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_core_pipeline::clear_color::ClearColorConfig": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "title": "Default" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - ], - "short_name": "Custom", - "title": "Custom", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "None" - } - ], - "short_name": "ClearColorConfig", - "title": "bevy_core_pipeline::clear_color::ClearColorConfig", - "type": "object", - "typeInfo": "Enum" - }, "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings": { "additionalProperties": false, "isComponent": true, @@ -2727,16 +2989,8 @@ "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "clear_color": { - "type": { - "$ref": "#/$defs/bevy_core_pipeline::clear_color::ClearColorConfig" - } - } - }, - "required": [ - "clear_color" - ], + "properties": {}, + "required": [], "short_name": "Camera2d", "title": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "type": "object", @@ -2747,11 +3001,6 @@ "isComponent": true, "isResource": false, "properties": { - "clear_color": { - "type": { - "$ref": "#/$defs/bevy_core_pipeline::clear_color::ClearColorConfig" - } - }, "depth_load_op": { "type": { "$ref": "#/$defs/bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp" @@ -2774,7 +3023,6 @@ } }, "required": [ - "clear_color", "depth_load_op", "depth_texture_usages", "screen_space_specular_transmission_steps", @@ -2812,6 +3060,36 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Camera3dDepthTextureUsage", + "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality": { + "isComponent": false, + "isResource": true, + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "ScreenSpaceTransmissionQuality", + "title": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", + "type": "string", + "typeInfo": "Enum" + }, "bevy_core_pipeline::fxaa::Fxaa": { "additionalProperties": false, "isComponent": true, @@ -2843,6 +3121,17 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::prepass::DeferredPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "DeferredPrepass", + "title": "bevy_core_pipeline::prepass::DeferredPrepass", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core_pipeline::prepass::DepthPrepass": { "additionalProperties": false, "isComponent": false, @@ -2854,6 +3143,17 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::prepass::MotionVectorPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "MotionVectorPrepass", + "title": "bevy_core_pipeline::prepass::MotionVectorPrepass", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core_pipeline::prepass::NormalPrepass": { "additionalProperties": false, "isComponent": false, @@ -2895,11 +3195,71 @@ "type": "string", "typeInfo": "Enum" }, - "bevy_ecs::Entity": { + "bevy_ecs::component::ComponentId": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/usize" + } + } + ], + "short_name": "ComponentId", + "title": "bevy_ecs::component::ComponentId", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ecs::component::ComponentTicks": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "added": { + "type": { + "$ref": "#/$defs/bevy_ecs::component::Tick" + } + }, + "changed": { + "type": { + "$ref": "#/$defs/bevy_ecs::component::Tick" + } + } + }, + "required": [ + "added", + "changed" + ], + "short_name": "ComponentTicks", + "title": "bevy_ecs::component::ComponentTicks", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ecs::component::Tick": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "tick": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "tick" + ], + "short_name": "Tick", + "title": "bevy_ecs::component::Tick", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ecs::entity::Entity": { "isComponent": false, "isResource": false, "short_name": "Entity", - "title": "bevy_ecs::Entity", + "title": "bevy_ecs::entity::Entity", "type": "object", "typeInfo": "Value" }, @@ -2915,7 +3275,7 @@ }, "scale_factor": { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } } }, @@ -2927,6 +3287,73 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_gizmos::aabb::AabbGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "default_color": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "draw_all" + ], + "short_name": "AabbGizmoConfigGroup", + "title": "bevy_gizmos::aabb::AabbGizmoConfigGroup", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_perspective": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "render_layers": { + "type": { + "$ref": "#/$defs/bevy_render::view::visibility::render_layers::RenderLayers" + } + } + }, + "required": [ + "enabled", + "line_width", + "line_perspective", + "depth_bias", + "render_layers" + ], + "short_name": "GizmoConfig", + "title": "bevy_gizmos::config::GizmoConfig", + "type": "object", + "typeInfo": "Struct" + }, "bevy_gltf::GltfExtras": { "additionalProperties": false, "isComponent": true, @@ -3017,6 +3444,86 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_gltf_components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "title": "bevy_gltf_components::GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings": { "additionalProperties": false, "isComponent": true, @@ -3074,51 +3581,29 @@ "type": "array", "typeInfo": "TupleStruct" }, - "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::AmbientLightSettings": { + "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "brightness": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color", - "brightness" - ], - "short_name": "AmbientLightSettings", - "title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::AmbientLightSettings", + "properties": {}, + "required": [], + "short_name": "Pickable", + "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::ShadowmapSettings": { + "bevy_gltf_worlflow_examples_common::game::player::Player": { "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "size" - ], - "short_name": "ShadowmapSettings", - "title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::ShadowmapSettings", + "properties": {}, + "required": [], + "short_name": "Player", + "title": "bevy_gltf_worlflow_examples_common::game::player::Player", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::AutoAABBCollider": { + "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": { "isComponent": true, "isResource": false, "oneOf": [ @@ -3127,11 +3612,11 @@ "Capsule" ], "short_name": "AutoAABBCollider", - "title": "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::AutoAABBCollider", + "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider", "type": "string", "typeInfo": "Enum" }, - "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::Collider": { + "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": { "isComponent": true, "isResource": false, "oneOf": [ @@ -3192,32 +3677,10 @@ } ], "short_name": "Collider", - "title": "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::Collider", + "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider", "type": "object", "typeInfo": "Enum" }, - "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Pickable", - "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::game::player::Player": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Player", - "title": "bevy_gltf_worlflow_examples_common::game::player::Player", - "type": "object", - "typeInfo": "Struct" - }, "bevy_hierarchy::components::children::Children": { "isComponent": true, "isResource": false, @@ -3225,7 +3688,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/smallvec::SmallVec<[bevy_ecs::Entity; 8]>" + "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" } } ], @@ -3241,7 +3704,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } ], @@ -3654,177 +4117,1580 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_input::keyboard::Key": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Character", + "title": "Character", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKey" + } + } + ], + "short_name": "Unidentified", + "title": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + ], + "short_name": "Dead", + "title": "Dead", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "Alt" + }, + { + "title": "AltGraph" + }, + { + "title": "CapsLock" + }, + { + "title": "Control" + }, + { + "title": "Fn" + }, + { + "title": "FnLock" + }, + { + "title": "NumLock" + }, + { + "title": "ScrollLock" + }, + { + "title": "Shift" + }, + { + "title": "Symbol" + }, + { + "title": "SymbolLock" + }, + { + "title": "Meta" + }, + { + "title": "Hyper" + }, + { + "title": "Super" + }, + { + "title": "Enter" + }, + { + "title": "Tab" + }, + { + "title": "Space" + }, + { + "title": "ArrowDown" + }, + { + "title": "ArrowLeft" + }, + { + "title": "ArrowRight" + }, + { + "title": "ArrowUp" + }, + { + "title": "End" + }, + { + "title": "Home" + }, + { + "title": "PageDown" + }, + { + "title": "PageUp" + }, + { + "title": "Backspace" + }, + { + "title": "Clear" + }, + { + "title": "Copy" + }, + { + "title": "CrSel" + }, + { + "title": "Cut" + }, + { + "title": "Delete" + }, + { + "title": "EraseEof" + }, + { + "title": "ExSel" + }, + { + "title": "Insert" + }, + { + "title": "Paste" + }, + { + "title": "Redo" + }, + { + "title": "Undo" + }, + { + "title": "Accept" + }, + { + "title": "Again" + }, + { + "title": "Attn" + }, + { + "title": "Cancel" + }, + { + "title": "ContextMenu" + }, + { + "title": "Escape" + }, + { + "title": "Execute" + }, + { + "title": "Find" + }, + { + "title": "Help" + }, + { + "title": "Pause" + }, + { + "title": "Play" + }, + { + "title": "Props" + }, + { + "title": "Select" + }, + { + "title": "ZoomIn" + }, + { + "title": "ZoomOut" + }, + { + "title": "BrightnessDown" + }, + { + "title": "BrightnessUp" + }, + { + "title": "Eject" + }, + { + "title": "LogOff" + }, + { + "title": "Power" + }, + { + "title": "PowerOff" + }, + { + "title": "PrintScreen" + }, + { + "title": "Hibernate" + }, + { + "title": "Standby" + }, + { + "title": "WakeUp" + }, + { + "title": "AllCandidates" + }, + { + "title": "Alphanumeric" + }, + { + "title": "CodeInput" + }, + { + "title": "Compose" + }, + { + "title": "Convert" + }, + { + "title": "FinalMode" + }, + { + "title": "GroupFirst" + }, + { + "title": "GroupLast" + }, + { + "title": "GroupNext" + }, + { + "title": "GroupPrevious" + }, + { + "title": "ModeChange" + }, + { + "title": "NextCandidate" + }, + { + "title": "NonConvert" + }, + { + "title": "PreviousCandidate" + }, + { + "title": "Process" + }, + { + "title": "SingleCandidate" + }, + { + "title": "HangulMode" + }, + { + "title": "HanjaMode" + }, + { + "title": "JunjaMode" + }, + { + "title": "Eisu" + }, + { + "title": "Hankaku" + }, + { + "title": "Hiragana" + }, + { + "title": "HiraganaKatakana" + }, + { + "title": "KanaMode" + }, + { + "title": "KanjiMode" + }, + { + "title": "Katakana" + }, + { + "title": "Romaji" + }, + { + "title": "Zenkaku" + }, + { + "title": "ZenkakuHankaku" + }, + { + "title": "Soft1" + }, + { + "title": "Soft2" + }, + { + "title": "Soft3" + }, + { + "title": "Soft4" + }, + { + "title": "ChannelDown" + }, + { + "title": "ChannelUp" + }, + { + "title": "Close" + }, + { + "title": "MailForward" + }, + { + "title": "MailReply" + }, + { + "title": "MailSend" + }, + { + "title": "MediaClose" + }, + { + "title": "MediaFastForward" + }, + { + "title": "MediaPause" + }, + { + "title": "MediaPlay" + }, + { + "title": "MediaPlayPause" + }, + { + "title": "MediaRecord" + }, + { + "title": "MediaRewind" + }, + { + "title": "MediaStop" + }, + { + "title": "MediaTrackNext" + }, + { + "title": "MediaTrackPrevious" + }, + { + "title": "New" + }, + { + "title": "Open" + }, + { + "title": "Print" + }, + { + "title": "Save" + }, + { + "title": "SpellCheck" + }, + { + "title": "Key11" + }, + { + "title": "Key12" + }, + { + "title": "AudioBalanceLeft" + }, + { + "title": "AudioBalanceRight" + }, + { + "title": "AudioBassBoostDown" + }, + { + "title": "AudioBassBoostToggle" + }, + { + "title": "AudioBassBoostUp" + }, + { + "title": "AudioFaderFront" + }, + { + "title": "AudioFaderRear" + }, + { + "title": "AudioSurroundModeNext" + }, + { + "title": "AudioTrebleDown" + }, + { + "title": "AudioTrebleUp" + }, + { + "title": "AudioVolumeDown" + }, + { + "title": "AudioVolumeUp" + }, + { + "title": "AudioVolumeMute" + }, + { + "title": "MicrophoneToggle" + }, + { + "title": "MicrophoneVolumeDown" + }, + { + "title": "MicrophoneVolumeUp" + }, + { + "title": "MicrophoneVolumeMute" + }, + { + "title": "SpeechCorrectionList" + }, + { + "title": "SpeechInputToggle" + }, + { + "title": "LaunchApplication1" + }, + { + "title": "LaunchApplication2" + }, + { + "title": "LaunchCalendar" + }, + { + "title": "LaunchContacts" + }, + { + "title": "LaunchMail" + }, + { + "title": "LaunchMediaPlayer" + }, + { + "title": "LaunchMusicPlayer" + }, + { + "title": "LaunchPhone" + }, + { + "title": "LaunchScreenSaver" + }, + { + "title": "LaunchSpreadsheet" + }, + { + "title": "LaunchWebBrowser" + }, + { + "title": "LaunchWebCam" + }, + { + "title": "LaunchWordProcessor" + }, + { + "title": "BrowserBack" + }, + { + "title": "BrowserFavorites" + }, + { + "title": "BrowserForward" + }, + { + "title": "BrowserHome" + }, + { + "title": "BrowserRefresh" + }, + { + "title": "BrowserSearch" + }, + { + "title": "BrowserStop" + }, + { + "title": "AppSwitch" + }, + { + "title": "Call" + }, + { + "title": "Camera" + }, + { + "title": "CameraFocus" + }, + { + "title": "EndCall" + }, + { + "title": "GoBack" + }, + { + "title": "GoHome" + }, + { + "title": "HeadsetHook" + }, + { + "title": "LastNumberRedial" + }, + { + "title": "Notification" + }, + { + "title": "MannerMode" + }, + { + "title": "VoiceDial" + }, + { + "title": "TV" + }, + { + "title": "TV3DMode" + }, + { + "title": "TVAntennaCable" + }, + { + "title": "TVAudioDescription" + }, + { + "title": "TVAudioDescriptionMixDown" + }, + { + "title": "TVAudioDescriptionMixUp" + }, + { + "title": "TVContentsMenu" + }, + { + "title": "TVDataService" + }, + { + "title": "TVInput" + }, + { + "title": "TVInputComponent1" + }, + { + "title": "TVInputComponent2" + }, + { + "title": "TVInputComposite1" + }, + { + "title": "TVInputComposite2" + }, + { + "title": "TVInputHDMI1" + }, + { + "title": "TVInputHDMI2" + }, + { + "title": "TVInputHDMI3" + }, + { + "title": "TVInputHDMI4" + }, + { + "title": "TVInputVGA1" + }, + { + "title": "TVMediaContext" + }, + { + "title": "TVNetwork" + }, + { + "title": "TVNumberEntry" + }, + { + "title": "TVPower" + }, + { + "title": "TVRadioService" + }, + { + "title": "TVSatellite" + }, + { + "title": "TVSatelliteBS" + }, + { + "title": "TVSatelliteCS" + }, + { + "title": "TVSatelliteToggle" + }, + { + "title": "TVTerrestrialAnalog" + }, + { + "title": "TVTerrestrialDigital" + }, + { + "title": "TVTimer" + }, + { + "title": "AVRInput" + }, + { + "title": "AVRPower" + }, + { + "title": "ColorF0Red" + }, + { + "title": "ColorF1Green" + }, + { + "title": "ColorF2Yellow" + }, + { + "title": "ColorF3Blue" + }, + { + "title": "ColorF4Grey" + }, + { + "title": "ColorF5Brown" + }, + { + "title": "ClosedCaptionToggle" + }, + { + "title": "Dimmer" + }, + { + "title": "DisplaySwap" + }, + { + "title": "DVR" + }, + { + "title": "Exit" + }, + { + "title": "FavoriteClear0" + }, + { + "title": "FavoriteClear1" + }, + { + "title": "FavoriteClear2" + }, + { + "title": "FavoriteClear3" + }, + { + "title": "FavoriteRecall0" + }, + { + "title": "FavoriteRecall1" + }, + { + "title": "FavoriteRecall2" + }, + { + "title": "FavoriteRecall3" + }, + { + "title": "FavoriteStore0" + }, + { + "title": "FavoriteStore1" + }, + { + "title": "FavoriteStore2" + }, + { + "title": "FavoriteStore3" + }, + { + "title": "Guide" + }, + { + "title": "GuideNextDay" + }, + { + "title": "GuidePreviousDay" + }, + { + "title": "Info" + }, + { + "title": "InstantReplay" + }, + { + "title": "Link" + }, + { + "title": "ListProgram" + }, + { + "title": "LiveContent" + }, + { + "title": "Lock" + }, + { + "title": "MediaApps" + }, + { + "title": "MediaAudioTrack" + }, + { + "title": "MediaLast" + }, + { + "title": "MediaSkipBackward" + }, + { + "title": "MediaSkipForward" + }, + { + "title": "MediaStepBackward" + }, + { + "title": "MediaStepForward" + }, + { + "title": "MediaTopMenu" + }, + { + "title": "NavigateIn" + }, + { + "title": "NavigateNext" + }, + { + "title": "NavigateOut" + }, + { + "title": "NavigatePrevious" + }, + { + "title": "NextFavoriteChannel" + }, + { + "title": "NextUserProfile" + }, + { + "title": "OnDemand" + }, + { + "title": "Pairing" + }, + { + "title": "PinPDown" + }, + { + "title": "PinPMove" + }, + { + "title": "PinPToggle" + }, + { + "title": "PinPUp" + }, + { + "title": "PlaySpeedDown" + }, + { + "title": "PlaySpeedReset" + }, + { + "title": "PlaySpeedUp" + }, + { + "title": "RandomToggle" + }, + { + "title": "RcLowBattery" + }, + { + "title": "RecordSpeedNext" + }, + { + "title": "RfBypass" + }, + { + "title": "ScanChannelsToggle" + }, + { + "title": "ScreenModeNext" + }, + { + "title": "Settings" + }, + { + "title": "SplitScreenToggle" + }, + { + "title": "STBInput" + }, + { + "title": "STBPower" + }, + { + "title": "Subtitle" + }, + { + "title": "Teletext" + }, + { + "title": "VideoModeNext" + }, + { + "title": "Wink" + }, + { + "title": "ZoomToggle" + }, + { + "title": "F1" + }, + { + "title": "F2" + }, + { + "title": "F3" + }, + { + "title": "F4" + }, + { + "title": "F5" + }, + { + "title": "F6" + }, + { + "title": "F7" + }, + { + "title": "F8" + }, + { + "title": "F9" + }, + { + "title": "F10" + }, + { + "title": "F11" + }, + { + "title": "F12" + }, + { + "title": "F13" + }, + { + "title": "F14" + }, + { + "title": "F15" + }, + { + "title": "F16" + }, + { + "title": "F17" + }, + { + "title": "F18" + }, + { + "title": "F19" + }, + { + "title": "F20" + }, + { + "title": "F21" + }, + { + "title": "F22" + }, + { + "title": "F23" + }, + { + "title": "F24" + }, + { + "title": "F25" + }, + { + "title": "F26" + }, + { + "title": "F27" + }, + { + "title": "F28" + }, + { + "title": "F29" + }, + { + "title": "F30" + }, + { + "title": "F31" + }, + { + "title": "F32" + }, + { + "title": "F33" + }, + { + "title": "F34" + }, + { + "title": "F35" + } + ], + "short_name": "Key", + "title": "bevy_input::keyboard::Key", + "type": "object", + "typeInfo": "Enum" + }, "bevy_input::keyboard::KeyCode": { "isComponent": false, "isResource": false, "oneOf": [ - "Key1", - "Key2", - "Key3", - "Key4", - "Key5", - "Key6", - "Key7", - "Key8", - "Key9", - "Key0", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "Escape", - "F1", - "F2", - "F3", - "F4", - "F5", - "F6", - "F7", - "F8", - "F9", - "F10", - "F11", - "F12", - "F13", - "F14", - "F15", - "F16", - "F17", - "F18", - "F19", - "F20", - "F21", - "F22", - "F23", - "F24", - "Snapshot", - "Scroll", - "Pause", - "Insert", - "Home", - "Delete", - "End", - "PageDown", - "PageUp", - "Left", - "Up", - "Right", - "Down", - "Back", - "Return", - "Space", - "Compose", - "Caret", - "Numlock", - "Numpad0", - "Numpad1", - "Numpad2", - "Numpad3", - "Numpad4", - "Numpad5", - "Numpad6", - "Numpad7", - "Numpad8", - "Numpad9", - "AbntC1", - "AbntC2", - "NumpadAdd", - "Apostrophe", - "Apps", - "Asterisk", - "Plus", - "At", - "Ax", - "Backslash", - "Calculator", - "Capital", - "Colon", - "Comma", - "Convert", - "NumpadDecimal", - "NumpadDivide", - "Equals", - "Grave", - "Kana", - "Kanji", - "AltLeft", - "BracketLeft", - "ControlLeft", - "ShiftLeft", - "SuperLeft", - "Mail", - "MediaSelect", - "MediaStop", - "Minus", - "NumpadMultiply", - "Mute", - "MyComputer", - "NavigateForward", - "NavigateBackward", - "NextTrack", - "NoConvert", - "NumpadComma", - "NumpadEnter", - "NumpadEquals", - "Oem102", - "Period", - "PlayPause", - "Power", - "PrevTrack", - "AltRight", - "BracketRight", - "ControlRight", - "ShiftRight", - "SuperRight", - "Semicolon", - "Slash", - "Sleep", - "Stop", - "NumpadSubtract", - "Sysrq", - "Tab", - "Underline", - "Unlabeled", - "VolumeDown", - "VolumeUp", - "Wake", - "WebBack", - "WebFavorites", - "WebForward", - "WebHome", - "WebRefresh", - "WebSearch", - "WebStop", - "Yen", - "Copy", - "Paste", - "Cut" + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKeyCode" + } + } + ], + "short_name": "Unidentified", + "title": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "Backquote" + }, + { + "title": "Backslash" + }, + { + "title": "BracketLeft" + }, + { + "title": "BracketRight" + }, + { + "title": "Comma" + }, + { + "title": "Digit0" + }, + { + "title": "Digit1" + }, + { + "title": "Digit2" + }, + { + "title": "Digit3" + }, + { + "title": "Digit4" + }, + { + "title": "Digit5" + }, + { + "title": "Digit6" + }, + { + "title": "Digit7" + }, + { + "title": "Digit8" + }, + { + "title": "Digit9" + }, + { + "title": "Equal" + }, + { + "title": "IntlBackslash" + }, + { + "title": "IntlRo" + }, + { + "title": "IntlYen" + }, + { + "title": "KeyA" + }, + { + "title": "KeyB" + }, + { + "title": "KeyC" + }, + { + "title": "KeyD" + }, + { + "title": "KeyE" + }, + { + "title": "KeyF" + }, + { + "title": "KeyG" + }, + { + "title": "KeyH" + }, + { + "title": "KeyI" + }, + { + "title": "KeyJ" + }, + { + "title": "KeyK" + }, + { + "title": "KeyL" + }, + { + "title": "KeyM" + }, + { + "title": "KeyN" + }, + { + "title": "KeyO" + }, + { + "title": "KeyP" + }, + { + "title": "KeyQ" + }, + { + "title": "KeyR" + }, + { + "title": "KeyS" + }, + { + "title": "KeyT" + }, + { + "title": "KeyU" + }, + { + "title": "KeyV" + }, + { + "title": "KeyW" + }, + { + "title": "KeyX" + }, + { + "title": "KeyY" + }, + { + "title": "KeyZ" + }, + { + "title": "Minus" + }, + { + "title": "Period" + }, + { + "title": "Quote" + }, + { + "title": "Semicolon" + }, + { + "title": "Slash" + }, + { + "title": "AltLeft" + }, + { + "title": "AltRight" + }, + { + "title": "Backspace" + }, + { + "title": "CapsLock" + }, + { + "title": "ContextMenu" + }, + { + "title": "ControlLeft" + }, + { + "title": "ControlRight" + }, + { + "title": "Enter" + }, + { + "title": "SuperLeft" + }, + { + "title": "SuperRight" + }, + { + "title": "ShiftLeft" + }, + { + "title": "ShiftRight" + }, + { + "title": "Space" + }, + { + "title": "Tab" + }, + { + "title": "Convert" + }, + { + "title": "KanaMode" + }, + { + "title": "Lang1" + }, + { + "title": "Lang2" + }, + { + "title": "Lang3" + }, + { + "title": "Lang4" + }, + { + "title": "Lang5" + }, + { + "title": "NonConvert" + }, + { + "title": "Delete" + }, + { + "title": "End" + }, + { + "title": "Help" + }, + { + "title": "Home" + }, + { + "title": "Insert" + }, + { + "title": "PageDown" + }, + { + "title": "PageUp" + }, + { + "title": "ArrowDown" + }, + { + "title": "ArrowLeft" + }, + { + "title": "ArrowRight" + }, + { + "title": "ArrowUp" + }, + { + "title": "NumLock" + }, + { + "title": "Numpad0" + }, + { + "title": "Numpad1" + }, + { + "title": "Numpad2" + }, + { + "title": "Numpad3" + }, + { + "title": "Numpad4" + }, + { + "title": "Numpad5" + }, + { + "title": "Numpad6" + }, + { + "title": "Numpad7" + }, + { + "title": "Numpad8" + }, + { + "title": "Numpad9" + }, + { + "title": "NumpadAdd" + }, + { + "title": "NumpadBackspace" + }, + { + "title": "NumpadClear" + }, + { + "title": "NumpadClearEntry" + }, + { + "title": "NumpadComma" + }, + { + "title": "NumpadDecimal" + }, + { + "title": "NumpadDivide" + }, + { + "title": "NumpadEnter" + }, + { + "title": "NumpadEqual" + }, + { + "title": "NumpadHash" + }, + { + "title": "NumpadMemoryAdd" + }, + { + "title": "NumpadMemoryClear" + }, + { + "title": "NumpadMemoryRecall" + }, + { + "title": "NumpadMemoryStore" + }, + { + "title": "NumpadMemorySubtract" + }, + { + "title": "NumpadMultiply" + }, + { + "title": "NumpadParenLeft" + }, + { + "title": "NumpadParenRight" + }, + { + "title": "NumpadStar" + }, + { + "title": "NumpadSubtract" + }, + { + "title": "Escape" + }, + { + "title": "Fn" + }, + { + "title": "FnLock" + }, + { + "title": "PrintScreen" + }, + { + "title": "ScrollLock" + }, + { + "title": "Pause" + }, + { + "title": "BrowserBack" + }, + { + "title": "BrowserFavorites" + }, + { + "title": "BrowserForward" + }, + { + "title": "BrowserHome" + }, + { + "title": "BrowserRefresh" + }, + { + "title": "BrowserSearch" + }, + { + "title": "BrowserStop" + }, + { + "title": "Eject" + }, + { + "title": "LaunchApp1" + }, + { + "title": "LaunchApp2" + }, + { + "title": "LaunchMail" + }, + { + "title": "MediaPlayPause" + }, + { + "title": "MediaSelect" + }, + { + "title": "MediaStop" + }, + { + "title": "MediaTrackNext" + }, + { + "title": "MediaTrackPrevious" + }, + { + "title": "Power" + }, + { + "title": "Sleep" + }, + { + "title": "AudioVolumeDown" + }, + { + "title": "AudioVolumeMute" + }, + { + "title": "AudioVolumeUp" + }, + { + "title": "WakeUp" + }, + { + "title": "Meta" + }, + { + "title": "Hyper" + }, + { + "title": "Turbo" + }, + { + "title": "Abort" + }, + { + "title": "Resume" + }, + { + "title": "Suspend" + }, + { + "title": "Again" + }, + { + "title": "Copy" + }, + { + "title": "Cut" + }, + { + "title": "Find" + }, + { + "title": "Open" + }, + { + "title": "Paste" + }, + { + "title": "Props" + }, + { + "title": "Select" + }, + { + "title": "Undo" + }, + { + "title": "Hiragana" + }, + { + "title": "Katakana" + }, + { + "title": "F1" + }, + { + "title": "F2" + }, + { + "title": "F3" + }, + { + "title": "F4" + }, + { + "title": "F5" + }, + { + "title": "F6" + }, + { + "title": "F7" + }, + { + "title": "F8" + }, + { + "title": "F9" + }, + { + "title": "F10" + }, + { + "title": "F11" + }, + { + "title": "F12" + }, + { + "title": "F13" + }, + { + "title": "F14" + }, + { + "title": "F15" + }, + { + "title": "F16" + }, + { + "title": "F17" + }, + { + "title": "F18" + }, + { + "title": "F19" + }, + { + "title": "F20" + }, + { + "title": "F21" + }, + { + "title": "F22" + }, + { + "title": "F23" + }, + { + "title": "F24" + }, + { + "title": "F25" + }, + { + "title": "F26" + }, + { + "title": "F27" + }, + { + "title": "F28" + }, + { + "title": "F29" + }, + { + "title": "F30" + }, + { + "title": "F31" + }, + { + "title": "F32" + }, + { + "title": "F33" + }, + { + "title": "F34" + }, + { + "title": "F35" + } ], "short_name": "KeyCode", "title": "bevy_input::keyboard::KeyCode", - "type": "string", + "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::KeyboardInput": { @@ -3834,12 +5700,12 @@ "properties": { "key_code": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/bevy_input::keyboard::KeyCode" } }, - "scan_code": { + "logical_key": { "type": { - "$ref": "#/$defs/u32" + "$ref": "#/$defs/bevy_input::keyboard::Key" } }, "state": { @@ -3849,12 +5715,13 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, "required": [ - "scan_code", + "key_code", + "logical_key", "state", "window" ], @@ -3863,21 +5730,157 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_input::keyboard::ScanCode": { + "bevy_input::keyboard::NativeKey": { "isComponent": false, "isResource": false, - "items": false, - "prefixItems": [ + "oneOf": [ { - "type": { - "$ref": "#/$defs/u32" - } + "title": "Unidentified" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "title": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "title": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "title": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "title": "Xkb", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Web", + "title": "Web", + "type": "array", + "typeInfo": "Tuple" } ], - "short_name": "ScanCode", - "title": "bevy_input::keyboard::ScanCode", - "type": "array", - "typeInfo": "TupleStruct" + "short_name": "NativeKey", + "title": "bevy_input::keyboard::NativeKey", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::keyboard::NativeKeyCode": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Unidentified" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "title": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "title": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "title": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "title": "Xkb", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "NativeKeyCode", + "title": "bevy_input::keyboard::NativeKeyCode", + "type": "object", + "typeInfo": "Enum" }, "bevy_input::mouse::MouseButton": { "isComponent": false, @@ -3892,6 +5895,12 @@ { "title": "Middle" }, + { + "title": "Back" + }, + { + "title": "Forward" + }, { "items": false, "prefixItems": [ @@ -3929,7 +5938,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -3986,7 +5995,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, "x": { @@ -4090,11 +6099,17 @@ "type": { "$ref": "#/$defs/glam::Vec2" } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } } }, "required": [ "phase", "position", + "window", "id" ], "short_name": "TouchInput", @@ -4234,30 +6249,101 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::environment_map::EnvironmentMapLight": { - "additionalProperties": false, + "bevy_pbr::fog::FogFalloff": { "isComponent": false, "isResource": false, - "properties": { - "diffuse_map": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "end": { + "title": "end", + "type": { + "$ref": "#/$defs/f32" + } + }, + "start": { + "title": "start", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "start", + "end" + ], + "short_name": "Linear", + "title": "Linear", + "type": "object", + "typeInfo": "Struct" }, - "specular_map": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } + { + "additionalProperties": false, + "properties": { + "density": { + "title": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "Exponential", + "title": "Exponential", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "properties": { + "density": { + "title": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "ExponentialSquared", + "title": "ExponentialSquared", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "properties": { + "extinction": { + "title": "extinction", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "inscattering": { + "title": "inscattering", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "extinction", + "inscattering" + ], + "short_name": "Atmospheric", + "title": "Atmospheric", + "type": "object", + "typeInfo": "Struct" } - }, - "required": [ - "diffuse_map", - "specular_map" ], - "short_name": "EnvironmentMapLight", - "title": "bevy_pbr::environment_map::EnvironmentMapLight", + "short_name": "FogFalloff", + "title": "bevy_pbr::fog::FogFalloff", "type": "object", - "typeInfo": "Struct" + "typeInfo": "Enum" }, "bevy_pbr::fog::FogSettings": { "additionalProperties": false, @@ -4396,7 +6482,7 @@ "properties": { "cascades": { "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>" } } }, @@ -4785,6 +6871,73 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::light_probe::LightProbe": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "LightProbe", + "title": "bevy_pbr::light_probe::LightProbe", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::environment_map::EnvironmentMapLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "diffuse_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "specular_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "diffuse_map", + "specular_map", + "intensity" + ], + "short_name": "EnvironmentMapLight", + "title": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "voxels": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "voxels", + "intensity" + ], + "short_name": "IrradianceVolume", + "title": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", + "type": "object", + "typeInfo": "Struct" + }, "bevy_pbr::material::DefaultOpaqueRendererMethod": { "isComponent": false, "isResource": false, @@ -4801,6 +6954,50 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_pbr::material::OpaqueRendererMethod": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Forward", + "Deferred", + "Auto" + ], + "short_name": "OpaqueRendererMethod", + "title": "bevy_pbr::material::OpaqueRendererMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::parallax::ParallaxMappingMethod": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Occlusion" + }, + { + "additionalProperties": false, + "properties": { + "max_steps": { + "title": "max_steps", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "max_steps" + ], + "short_name": "Relief", + "title": "Relief", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ParallaxMappingMethod", + "title": "bevy_pbr::parallax::ParallaxMappingMethod", + "type": "object", + "typeInfo": "Enum" + }, "bevy_pbr::pbr_material::StandardMaterial": { "additionalProperties": false, "isComponent": false, @@ -4881,6 +7078,11 @@ "$ref": "#/$defs/f32" } }, + "lightmap_exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, "max_parallax_layer_count": { "type": { "$ref": "#/$defs/f32" @@ -4968,6 +7170,7 @@ "parallax_depth_scale", "parallax_mapping_method", "max_parallax_layer_count", + "lightmap_exposure", "opaque_render_method", "deferred_lighting_pass_id" ], @@ -5017,6 +7220,25 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::wireframe::WireframeColor": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + }, + "required": [ + "color" + ], + "short_name": "WireframeColor", + "title": "bevy_pbr::wireframe::WireframeColor", + "type": "object", + "typeInfo": "Struct" + }, "bevy_pbr::wireframe::WireframeConfig": { "additionalProperties": false, "isComponent": false, @@ -5339,7 +7561,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_utils::HashSet" + "$ref": "#/$defs/bevy_utils::HashSet" } } ], @@ -5515,6 +7737,11 @@ "isComponent": true, "isResource": false, "properties": { + "clear_color": { + "type": { + "$ref": "#/$defs/bevy_render::camera::clear_color::ClearColorConfig" + } + }, "hdr": { "type": { "$ref": "#/$defs/bool" @@ -5545,28 +7772,37 @@ "order", "is_active", "hdr", - "msaa_writeback" + "msaa_writeback", + "clear_color" ], "short_name": "Camera", "title": "bevy_render::camera::camera::Camera", "type": "object", "typeInfo": "Struct" }, + "bevy_render::camera::camera::CameraMainTextureUsages": { + "isComponent": true, + "isResource": false, + "short_name": "CameraMainTextureUsages", + "title": "bevy_render::camera::camera::CameraMainTextureUsages", + "type": "object", + "typeInfo": "Value" + }, "bevy_render::camera::camera::CameraRenderGraph": { "isComponent": true, "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::borrow::Cow" - } - } - ], "short_name": "CameraRenderGraph", "title": "bevy_render::camera::camera::CameraRenderGraph", - "type": "array", - "typeInfo": "TupleStruct" + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::camera::camera::Exposure": { + "isComponent": true, + "isResource": false, + "short_name": "Exposure", + "title": "bevy_render::camera::camera::Exposure", + "type": "object", + "typeInfo": "Value" }, "bevy_render::camera::camera::RenderTarget": { "isComponent": false, @@ -5651,6 +7887,52 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_render::camera::clear_color::ClearColor": { + "isComponent": false, + "isResource": true, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + ], + "short_name": "ClearColor", + "title": "bevy_render::camera::clear_color::ClearColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::clear_color::ClearColorConfig": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Default" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + ], + "short_name": "Custom", + "title": "Custom", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "None" + } + ], + "short_name": "ClearColorConfig", + "title": "bevy_render::camera::clear_color::ClearColorConfig", + "type": "object", + "typeInfo": "Enum" + }, "bevy_render::camera::projection::OrthographicProjection": { "additionalProperties": false, "isComponent": true, @@ -6142,6 +8424,11 @@ "isComponent": false, "isResource": false, "properties": { + "asset_usage": { + "type": { + "$ref": "#/$defs/bevy_render::render_asset::RenderAssetUsages" + } + }, "indices": { "type": { "$ref": "#/$defs/core::option::Option" @@ -6158,7 +8445,9 @@ } } }, - "required": [], + "required": [ + "asset_usage" + ], "short_name": "Mesh", "title": "bevy_render::mesh::mesh::Mesh", "type": "object", @@ -6176,7 +8465,7 @@ }, "joints": { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } }, @@ -6523,6 +8812,62 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_sprite::sprite::ImageScaleMode": { + "isComponent": true, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::TextureSlicer" + } + } + ], + "short_name": "Sliced", + "title": "Sliced", + "type": "array", + "typeInfo": "Tuple" + }, + { + "additionalProperties": false, + "properties": { + "stretch_value": { + "title": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + }, + "tile_x": { + "title": "tile_x", + "type": { + "$ref": "#/$defs/bool" + } + }, + "tile_y": { + "title": "tile_y", + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "tile_x", + "tile_y", + "stretch_value" + ], + "short_name": "Tiled", + "title": "Tiled", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ImageScaleMode", + "title": "bevy_sprite::sprite::ImageScaleMode", + "type": "object", + "typeInfo": "Enum" + }, "bevy_sprite::sprite::Sprite": { "additionalProperties": false, "isComponent": true, @@ -6571,6 +8916,31 @@ "typeInfo": "Struct" }, "bevy_sprite::texture_atlas::TextureAtlas": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "layout": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "layout", + "index" + ], + "short_name": "TextureAtlas", + "title": "bevy_sprite::texture_atlas::TextureAtlas", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_atlas::TextureAtlasLayout": { "additionalProperties": false, "isComponent": false, "isResource": false, @@ -6580,11 +8950,6 @@ "$ref": "#/$defs/glam::Vec2" } }, - "texture": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } - }, "texture_handles": { "type": { "$ref": "#/$defs/core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>" @@ -6597,60 +8962,48 @@ } }, "required": [ - "texture", "size", "textures" ], - "short_name": "TextureAtlas", - "title": "bevy_sprite::texture_atlas::TextureAtlas", + "short_name": "TextureAtlasLayout", + "title": "bevy_sprite::texture_atlas::TextureAtlasLayout", "type": "object", "typeInfo": "Struct" }, - "bevy_sprite::texture_atlas::TextureAtlasSprite": { + "bevy_sprite::texture_slice::slicer::TextureSlicer": { "additionalProperties": false, - "isComponent": true, + "isComponent": false, "isResource": false, "properties": { - "anchor": { + "border": { "type": { - "$ref": "#/$defs/bevy_sprite::sprite::Anchor" + "$ref": "#/$defs/bevy_sprite::texture_slice::border_rect::BorderRect" } }, - "color": { + "center_scale_mode": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" } }, - "custom_size": { + "max_corner_scale": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/f32" } }, - "flip_x": { + "sides_scale_mode": { "type": { - "$ref": "#/$defs/bool" - } - }, - "flip_y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "index": { - "type": { - "$ref": "#/$defs/usize" + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" } } }, "required": [ - "color", - "index", - "flip_x", - "flip_y", - "anchor" + "border", + "center_scale_mode", + "sides_scale_mode", + "max_corner_scale" ], - "short_name": "TextureAtlasSprite", - "title": "bevy_sprite::texture_atlas::TextureAtlasSprite", + "short_name": "TextureSlicer", + "title": "bevy_sprite::texture_slice::slicer::TextureSlicer", "type": "object", "typeInfo": "Struct" }, @@ -6711,14 +9064,27 @@ "type": "string", "typeInfo": "Enum" }, + "bevy_text::text::JustifyText": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Left", + "Center", + "Right" + ], + "short_name": "JustifyText", + "title": "bevy_text::text::JustifyText", + "type": "string", + "typeInfo": "Enum" + }, "bevy_text::text::Text": { "additionalProperties": false, "isComponent": true, "isResource": false, "properties": { - "alignment": { + "justify": { "type": { - "$ref": "#/$defs/bevy_text::text::TextAlignment" + "$ref": "#/$defs/bevy_text::text::JustifyText" } }, "linebreak_behavior": { @@ -6734,7 +9100,7 @@ }, "required": [ "sections", - "alignment", + "justify", "linebreak_behavior" ], "short_name": "Text", @@ -6742,19 +9108,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_text::text::TextAlignment": { - "isComponent": false, - "isResource": false, - "oneOf": [ - "Left", - "Center", - "Right" - ], - "short_name": "TextAlignment", - "title": "bevy_text::text::TextAlignment", - "type": "string", - "typeInfo": "Enum" - }, "bevy_text::text::TextSection": { "additionalProperties": false, "isComponent": false, @@ -7195,6 +9548,43 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_time::virt::Virtual": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "effective_speed": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "max_delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "relative_speed": { + "type": { + "$ref": "#/$defs/f64" + } + } + }, + "required": [ + "max_delta", + "paused", + "relative_speed", + "effective_speed" + ], + "short_name": "Virtual", + "title": "bevy_time::virt::Virtual", + "type": "object", + "typeInfo": "Struct" + }, "bevy_transform::components::global_transform::GlobalTransform": { "isComponent": true, "isResource": false, @@ -7249,7 +9639,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } } ], @@ -7258,25 +9648,6 @@ "type": "array", "typeInfo": "TupleStruct" }, - "bevy_ui::camera_config::UiCameraConfig": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "show_ui": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "show_ui" - ], - "short_name": "UiCameraConfig", - "title": "bevy_ui::camera_config::UiCameraConfig", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ui::focus::FocusPolicy": { "isComponent": true, "isResource": false, @@ -7884,7 +10255,7 @@ }, "tracks": { "type": { - "$ref": "#/$defs/smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" + "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" } } }, @@ -8137,6 +10508,22 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_ui::ui_node::TargetCamera": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + ], + "short_name": "TargetCamera", + "title": "bevy_ui::ui_node::TargetCamera", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_ui::ui_node::UiImage": { "additionalProperties": false, "isComponent": true, @@ -8168,37 +10555,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_ui::ui_node::UiTextureAtlasImage": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "flip_x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "flip_y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "index": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "index", - "flip_x", - "flip_y" - ], - "short_name": "UiTextureAtlasImage", - "title": "bevy_ui::ui_node::UiTextureAtlasImage", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ui::ui_node::ZIndex": { "isComponent": true, "isResource": false, @@ -8335,31 +10691,40 @@ "type": "object", "typeInfo": "Value" }, + "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "short_name": "SmallVec<[Entity; 8]>", + "title": "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", + "type": "array", + "typeInfo": "List" + }, "bevy_window::cursor::CursorIcon": { "isComponent": false, "isResource": false, "oneOf": [ "Default", - "Crosshair", - "Hand", - "Arrow", - "Move", - "Text", - "Wait", - "Help", - "Progress", - "NotAllowed", "ContextMenu", + "Help", + "Pointer", + "Progress", + "Wait", "Cell", + "Crosshair", + "Text", "VerticalText", "Alias", "Copy", + "Move", "NoDrop", + "NotAllowed", "Grab", "Grabbing", - "AllScroll", - "ZoomIn", - "ZoomOut", "EResize", "NResize", "NeResize", @@ -8373,7 +10738,10 @@ "NeswResize", "NwseResize", "ColResize", - "RowResize" + "RowResize", + "AllScroll", + "ZoomIn", + "ZoomOut" ], "short_name": "CursorIcon", "title": "bevy_window::cursor::CursorIcon", @@ -8400,7 +10768,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8419,7 +10787,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8436,6 +10804,11 @@ "isComponent": false, "isResource": false, "properties": { + "delta": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "position": { "type": { "$ref": "#/$defs/glam::Vec2" @@ -8443,7 +10816,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8472,7 +10845,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8497,7 +10870,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8516,7 +10889,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8541,12 +10914,12 @@ "properties": { "char": { "type": { - "$ref": "#/$defs/char" + "$ref": "#/$defs/smol_str::SmolStr" } }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8582,7 +10955,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8602,7 +10975,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8621,7 +10994,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8640,7 +11013,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8664,7 +11037,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8682,19 +11055,19 @@ "isComponent": false, "isResource": false, "properties": { - "entity": { - "type": { - "$ref": "#/$defs/bevy_ecs::Entity" - } - }, "position": { "type": { "$ref": "#/$defs/glam::IVec2" } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } } }, "required": [ - "entity", + "window", "position" ], "short_name": "WindowMoved", @@ -8702,6 +11075,31 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_window::event::WindowOccluded": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "occluded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "occluded" + ], + "short_name": "WindowOccluded", + "title": "bevy_window::event::WindowOccluded", + "type": "object", + "typeInfo": "Struct" + }, "bevy_window::event::WindowResized": { "additionalProperties": false, "isComponent": false, @@ -8719,7 +11117,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8745,7 +11143,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8770,7 +11168,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8993,11 +11391,6 @@ "$ref": "#/$defs/bevy_window::window::EnabledButtons" } }, - "fit_canvas_to_parent": { - "type": { - "$ref": "#/$defs/bool" - } - }, "focused": { "type": { "$ref": "#/$defs/bool" @@ -9023,6 +11416,11 @@ "$ref": "#/$defs/bevy_window::window::WindowMode" } }, + "name": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "position": { "type": { "$ref": "#/$defs/bevy_window::window::WindowPosition" @@ -9094,7 +11492,6 @@ "transparent", "focused", "window_level", - "fit_canvas_to_parent", "prevent_default_event_handling", "internal", "ime_enabled", @@ -9228,12 +11625,12 @@ }, "scale_factor": { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } }, "scale_factor_override": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } } }, @@ -9283,6 +11680,14 @@ "type": "object", "typeInfo": "Value" }, + "core::ops::Range": { + "isComponent": false, + "isResource": false, + "short_name": "Range", + "title": "core::ops::Range", + "type": "object", + "typeInfo": "Value" + }, "core::option::Option": { "isComponent": false, "isResource": false, @@ -10493,19 +12898,6 @@ "type": "int", "typeInfo": "Value" }, - "smallvec::SmallVec<[bevy_ecs::Entity; 8]>": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/bevy_ecs::Entity" - } - }, - "short_name": "SmallVec<[Entity; 8]>", - "title": "smallvec::SmallVec<[bevy_ecs::Entity; 8]>", - "type": "array", - "typeInfo": "List" - }, "std::ffi::OsString": { "isComponent": false, "isResource": false, diff --git a/examples/bevy_registry_export/basic/src/core/mod.rs b/examples/bevy_registry_export/basic/src/core/mod.rs index 5421e4e..73dccf1 100644 --- a/examples/bevy_registry_export/basic/src/core/mod.rs +++ b/examples/bevy_registry_export/basic/src/core/mod.rs @@ -7,7 +7,7 @@ impl Plugin for CorePlugin { fn build(&self, app: &mut App) { app.add_plugins(( ExportRegistryPlugin { - save_path: "assets/registry.json".into(), + save_path: "registry.json".into(), ..Default::default() }, BlueprintsPlugin { diff --git a/examples/bevy_registry_export/basic/src/game/in_game.rs b/examples/bevy_registry_export/basic/src/game/in_game.rs index 2338956..75be98a 100644 --- a/examples/bevy_registry_export/basic/src/game/in_game.rs +++ b/examples/bevy_registry_export/basic/src/game/in_game.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; +use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -11,7 +11,6 @@ pub fn setup_game( models: Res>, mut next_game_state: ResMut>, ) { - println!("setting up all stuff"); commands.insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, @@ -41,12 +40,12 @@ pub fn setup_game( struct UnregisteredComponent; pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; @@ -82,47 +81,3 @@ pub fn spawn_test( commands.entity(world).add_child(new_entity); } } - -pub fn spawn_test_unregisted_components( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::U) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - UnregisteredComponent, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_registry_export/basic/src/game/in_main_menu.rs b/examples/bevy_registry_export/basic/src/game/in_main_menu.rs index c1a4b8b..2b72d42 100644 --- a/examples/bevy_registry_export/basic/src/game/in_main_menu.rs +++ b/examples/bevy_registry_export/basic/src/game/in_main_menu.rs @@ -1,8 +1,17 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, InMainMenu}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; pub fn setup_main_menu(mut commands: Commands) { - commands.spawn((Camera2dBundle::default(), InMainMenu)); + commands.spawn(( + Camera2dBundle { + camera: Camera { + order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 + ..default() + }, + ..Default::default() + }, + InMainMenu, + )); commands.spawn(( TextBundle::from_section( @@ -89,24 +98,10 @@ pub fn teardown_main_menu(bla: Query>, mut commands: Co } pub fn main_menu( - keycode: Res>, - + keycode: Res>, mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, ) { - if keycode.just_pressed(KeyCode::Return) { + if keycode.just_pressed(KeyCode::Enter) { next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::L) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::S) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) } } diff --git a/examples/bevy_registry_export/basic/src/game/mod.rs b/examples/bevy_registry_export/basic/src/game/mod.rs index b236141..a8e8352 100644 --- a/examples/bevy_registry_export/basic/src/game/mod.rs +++ b/examples/bevy_registry_export/basic/src/game/mod.rs @@ -5,18 +5,15 @@ pub mod in_main_menu; pub use in_main_menu::*; use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { - app.add_systems( - Update, - (spawn_test, spawn_test_unregisted_components).run_if(in_state(GameState::InGame)), - ) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); + app.add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) + .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) + .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) + .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) + .add_systems(OnEnter(AppState::AppRunning), setup_game); } } diff --git a/examples/bevy_registry_export/basic/src/main.rs b/examples/bevy_registry_export/basic/src/main.rs index 8fca426..3c95987 100644 --- a/examples/bevy_registry_export/basic/src/main.rs +++ b/examples/bevy_registry_export/basic/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/examples/common/Cargo.toml b/examples/common/Cargo.toml index 9f19715..2951869 100644 --- a/examples/common/Cargo.toml +++ b/examples/common/Cargo.toml @@ -4,10 +4,18 @@ version = "0.1.0" edition = "2021" license = "MIT OR Apache-2.0" +[features] +blueprints = ["dep:bevy_gltf_blueprints"] +physics_rapier = ["dep:bevy_rapier3d"] +physics_xpbd = ["dep:bevy_xpbd_3d"] +default = ["blueprints", "physics_rapier"] + + [dependencies] -bevy="0.12" -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints" } -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } +bevy = { version = "0.13", features = ["dynamic_linking"] } +bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } +bevy_rapier3d = { version = "0.25", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"], optional = true } +bevy_xpbd_3d = { version = "0.4", optional = true } +bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] } +bevy_editor_pls = { version = "0.8" } rand = "0.8.5" diff --git a/examples/common/src/assets/mod.rs b/examples/common/src/assets/mod.rs index a2c8b22..7034ca6 100644 --- a/examples/common/src/assets/mod.rs +++ b/examples/common/src/assets/mod.rs @@ -15,21 +15,21 @@ impl Plugin for AssetsPlugin { app // load core assets (ie assets needed in the main menu, and everywhere else before loading more assets in game) .add_loading_state( - LoadingState::new(AppState::CoreLoading).continue_to_state(AppState::MenuRunning), + LoadingState::new(AppState::CoreLoading) + .continue_to_state(AppState::MenuRunning) + .with_dynamic_assets_file::( + "assets_core.assets.ron", + ) + .load_collection::(), ) - .add_dynamic_collection_to_loading_state::<_, StandardDynamicAssetCollection>( - AppState::CoreLoading, - "assets_core.assets.ron", - ) - .add_collection_to_loading_state::<_, CoreAssets>(AppState::CoreLoading) // load game assets .add_loading_state( - LoadingState::new(AppState::AppLoading).continue_to_state(AppState::AppRunning), - ) - .add_dynamic_collection_to_loading_state::<_, StandardDynamicAssetCollection>( - AppState::AppLoading, - "assets_game.assets.ron", - ) - .add_collection_to_loading_state::<_, GameAssets>(AppState::AppLoading); + LoadingState::new(AppState::AppLoading) + .continue_to_state(AppState::AppRunning) + .with_dynamic_assets_file::( + "assets_game.assets.ron", + ) + .load_collection::(), + ); } } diff --git a/examples/common/src/core/camera/camera_replace_proxies.rs b/examples/common/src/core/camera/camera_replace_proxies.rs index c72e84a..9d03d14 100644 --- a/examples/common/src/core/camera/camera_replace_proxies.rs +++ b/examples/common/src/core/camera/camera_replace_proxies.rs @@ -3,6 +3,7 @@ use bevy::core_pipeline::experimental::taa::TemporalAntiAliasBundle; use bevy::core_pipeline::tonemapping::{DebandDither, Tonemapping}; use bevy::pbr::ScreenSpaceAmbientOcclusionBundle; use bevy::prelude::*; +use bevy::render::camera::Exposure; use super::CameraTrackingOffset; @@ -17,6 +18,7 @@ pub fn camera_replace_proxies( ( Entity, &mut Camera, + &mut Exposure, Option<&BloomSettings>, Option<&SSAOSettings>, ), @@ -26,9 +28,11 @@ pub fn camera_replace_proxies( added_bloom_settings: Query<&BloomSettings, Added>, added_ssao_settings: Query<&SSAOSettings, Added>, // Move to camera ) { - for (entity, mut camera, bloom_settings, ssao_setting) in added_cameras.iter_mut() { + for (entity, mut camera, mut exposure, bloom_settings, ssao_setting) in added_cameras.iter_mut() + { info!("detected added camera, updating proxy"); camera.hdr = true; + exposure.ev100 *= 1.0; commands .entity(entity) .insert(DebandDither::Enabled) diff --git a/examples/common/src/core/lighting/lighting_replace_proxies.rs b/examples/common/src/core/lighting/lighting_replace_proxies.rs deleted file mode 100644 index aec4743..0000000 --- a/examples/common/src/core/lighting/lighting_replace_proxies.rs +++ /dev/null @@ -1,60 +0,0 @@ -use bevy::prelude::*; - -use bevy::pbr::{CascadeShadowConfig, CascadeShadowConfigBuilder, DirectionalLightShadowMap}; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct AmbientLightSettings { - pub color: Color, - pub brightness: f32, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct ShadowmapSettings { - pub size: usize, -} - -pub fn lighting_replace_proxies( - mut added_dirights: Query<(Entity, &mut DirectionalLight), Added>, - mut added_spotlights: Query<&mut SpotLight, Added>, - mut added_pointlights: Query<&mut PointLight, Added>, - - added_ambient_proxies: Query<&AmbientLightSettings, Added>, - added_shadowmap_settings: Query<&ShadowmapSettings, Added>, - - mut commands: Commands, -) { - for (entity, mut light) in added_dirights.iter_mut() { - light.illuminance *= 5.0; - light.shadows_enabled = true; - let shadow_config: CascadeShadowConfig = CascadeShadowConfigBuilder { - first_cascade_far_bound: 15.0, - maximum_distance: 135.0, - ..default() - } - .into(); - commands.entity(entity).insert(shadow_config); - } - for mut light in added_spotlights.iter_mut() { - light.shadows_enabled = true; - } - - for mut light in added_pointlights.iter_mut() { - light.intensity *= 0.001; // arbitrary/ eyeballed to match the levels of Blender - light.shadows_enabled = true; - } - - for setting in added_shadowmap_settings.iter() { - commands.insert_resource(DirectionalLightShadowMap { size: setting.size }); - } - - for ambient in added_ambient_proxies.iter() { - commands.insert_resource(AmbientLight { - color: ambient.color, - brightness: ambient.brightness, - }); - // FIXME: does this belong here ? - commands.insert_resource(ClearColor(ambient.color * ambient.brightness)); - } -} diff --git a/examples/common/src/core/lighting/mod.rs b/examples/common/src/core/lighting/mod.rs deleted file mode 100644 index 237dafa..0000000 --- a/examples/common/src/core/lighting/mod.rs +++ /dev/null @@ -1,16 +0,0 @@ -mod lighting_replace_proxies; -use lighting_replace_proxies::*; - -use bevy::pbr::NotShadowCaster; -use bevy::prelude::*; - -pub struct LightingPlugin; -impl Plugin for LightingPlugin { - fn build(&self, app: &mut App) { - app.register_type::() - .register_type::() - // FIXME: adding these since they are missing - .register_type::() - .add_systems(PreUpdate, lighting_replace_proxies); - } -} diff --git a/examples/common/src/core/mod.rs b/examples/common/src/core/mod.rs index 8c75182..4d8dde2 100644 --- a/examples/common/src/core/mod.rs +++ b/examples/common/src/core/mod.rs @@ -1,20 +1,14 @@ pub mod camera; pub use camera::*; -pub mod lighting; -pub use lighting::*; - //pub mod relationships; //pub use relationships::*; -pub mod physics; -pub use physics::*; - use bevy::prelude::*; pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { - app.add_plugins((LightingPlugin, CameraPlugin, PhysicsPlugin)); + app.add_plugins(CameraPlugin); } } diff --git a/examples/common/src/core/physics/mod.rs b/examples/common/src/core/physics/mod.rs deleted file mode 100644 index 3b64090..0000000 --- a/examples/common/src/core/physics/mod.rs +++ /dev/null @@ -1,34 +0,0 @@ -pub mod physics_replace_proxies; -pub use physics_replace_proxies::*; - -pub mod utils; - -pub mod controls; -pub use controls::*; - -use crate::state::GameState; -use bevy::prelude::*; -use bevy_gltf_blueprints::GltfBlueprintsSet; -use bevy_rapier3d::{ - prelude::{NoUserData, RapierPhysicsPlugin}, - render::RapierDebugRenderPlugin, -}; - -pub struct PhysicsPlugin; -impl Plugin for PhysicsPlugin { - fn build(&self, app: &mut App) { - app.add_plugins(( - RapierPhysicsPlugin::::default(), - RapierDebugRenderPlugin::default(), - )) - .register_type::() - .register_type::() - .add_systems( - Update, - physics_replace_proxies.after(GltfBlueprintsSet::AfterSpawn), - ) - .add_systems(Update, toggle_physics_debug) - .add_systems(OnEnter(GameState::InGame), resume_physics) - .add_systems(OnExit(GameState::InGame), pause_physics); - } -} diff --git a/examples/common/src/game/player/mod.rs b/examples/common/src/game/player/mod.rs index f8ef408..6cced85 100644 --- a/examples/common/src/game/player/mod.rs +++ b/examples/common/src/game/player/mod.rs @@ -8,22 +8,22 @@ use crate::GameState; pub struct Player; fn player_move_demo( - keycode: Res>, + keycode: Res>, mut players: Query<&mut Transform, With>, ) { let speed = 0.2; if let Ok(mut player) = players.get_single_mut() { - if keycode.pressed(KeyCode::Left) { + if keycode.pressed(KeyCode::ArrowLeft) { player.translation.x += speed; } - if keycode.pressed(KeyCode::Right) { + if keycode.pressed(KeyCode::ArrowRight) { player.translation.x -= speed; } - if keycode.pressed(KeyCode::Up) { + if keycode.pressed(KeyCode::ArrowUp) { player.translation.z += speed; } - if keycode.pressed(KeyCode::Down) { + if keycode.pressed(KeyCode::ArrowDown) { player.translation.z -= speed; } } diff --git a/examples/common/src/lib.rs b/examples/common/src/lib.rs index c41040c..289f9af 100644 --- a/examples/common/src/lib.rs +++ b/examples/common/src/lib.rs @@ -11,10 +11,17 @@ pub mod game; pub use game::*; use bevy::prelude::*; +use bevy_editor_pls::prelude::*; pub struct CommonPlugin; impl Plugin for CommonPlugin { fn build(&self, app: &mut App) { - app.add_plugins((StatePlugin, AssetsPlugin, CorePlugin, GamePlugin)); + app.add_plugins(( + StatePlugin, + AssetsPlugin, + CorePlugin, + GamePlugin, + EditorPlugin::default(), + )); } } diff --git a/examples/common/src/state.rs b/examples/common/src/state.rs index 725ac7f..25aeaca 100644 --- a/examples/common/src/state.rs +++ b/examples/common/src/state.rs @@ -52,6 +52,6 @@ pub struct InGameLoading; pub struct StatePlugin; impl Plugin for StatePlugin { fn build(&self, app: &mut App) { - app.add_state::().add_state::(); + app.init_state::().init_state::(); } } diff --git a/examples/common_rapier/Cargo.toml b/examples/common_rapier/Cargo.toml new file mode 100644 index 0000000..5289163 --- /dev/null +++ b/examples/common_rapier/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "bevy_gltf_worlflow_examples_common_rapier" +version = "0.1.0" +edition = "2021" +license = "MIT OR Apache-2.0" + +[features] +blueprints = ["dep:bevy_gltf_blueprints"] +default = ["blueprints"] + + +[dependencies] +bevy = { version = "0.13", features = ["dynamic_linking"] } +bevy_gltf_worlflow_examples_common = { path = "../common" } +bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } +bevy_rapier3d = { version = "0.25", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] } +bevy_editor_pls = { version = "0.8" } +rand = "0.8.5" diff --git a/examples/common_rapier/src/lib.rs b/examples/common_rapier/src/lib.rs new file mode 100644 index 0000000..0df818d --- /dev/null +++ b/examples/common_rapier/src/lib.rs @@ -0,0 +1,13 @@ +use bevy::prelude::*; +use bevy_gltf_worlflow_examples_common::CommonPlugin as CommonBasePlugin; + +pub use bevy_gltf_worlflow_examples_common::*; + +mod physics; + +pub struct CommonPlugin; +impl Plugin for CommonPlugin { + fn build(&self, app: &mut App) { + app.add_plugins((physics::plugin, CommonBasePlugin)); + } +} diff --git a/examples/common/src/core/physics/controls.rs b/examples/common_rapier/src/physics/controls.rs similarity index 57% rename from examples/common/src/core/physics/controls.rs rename to examples/common_rapier/src/physics/controls.rs index 2562548..ae5ecbc 100644 --- a/examples/common/src/core/physics/controls.rs +++ b/examples/common_rapier/src/physics/controls.rs @@ -1,26 +1,26 @@ use bevy::{ ecs::system::Res, - input::{keyboard::KeyCode, Input}, + input::{keyboard::KeyCode, ButtonInput}, log::info, prelude::ResMut, }; use bevy_rapier3d::{prelude::RapierConfiguration, render::DebugRenderContext}; -pub fn pause_physics(mut physics_config: ResMut) { +pub(crate) fn pause_physics(mut physics_config: ResMut) { info!("pausing physics"); physics_config.physics_pipeline_active = false; } -pub fn resume_physics(mut physics_config: ResMut) { +pub(crate) fn resume_physics(mut physics_config: ResMut) { info!("unpausing physics"); physics_config.physics_pipeline_active = true; } -pub fn toggle_physics_debug( +pub(crate) fn toggle_physics_debug( mut debug_config: ResMut, - keycode: Res>, + keycode: Res>, ) { - if keycode.just_pressed(KeyCode::D) { + if keycode.just_pressed(KeyCode::KeyD) { debug_config.enabled = !debug_config.enabled; } } diff --git a/examples/common_rapier/src/physics/mod.rs b/examples/common_rapier/src/physics/mod.rs new file mode 100644 index 0000000..f8f00b6 --- /dev/null +++ b/examples/common_rapier/src/physics/mod.rs @@ -0,0 +1,31 @@ +pub(crate) mod physics_replace_proxies; +pub(crate) use physics_replace_proxies::*; + +pub(crate) mod utils; + +pub(crate) mod controls; +pub(crate) use controls::*; + +use bevy::prelude::*; +use bevy_gltf_blueprints::GltfBlueprintsSet; +use bevy_gltf_worlflow_examples_common::state::GameState; +use bevy_rapier3d::{ + prelude::{NoUserData, RapierPhysicsPlugin}, + render::RapierDebugRenderPlugin, +}; + +pub(crate) fn plugin(app: &mut App) { + app.add_plugins(( + RapierPhysicsPlugin::::default(), + RapierDebugRenderPlugin::default(), + )) + .register_type::() + .register_type::() + .add_systems( + Update, + physics_replace_proxies.after(GltfBlueprintsSet::AfterSpawn), + ) + .add_systems(Update, toggle_physics_debug) + .add_systems(OnEnter(GameState::InGame), resume_physics) + .add_systems(OnExit(GameState::InGame), pause_physics); +} diff --git a/examples/common/src/core/physics/physics_replace_proxies.rs b/examples/common_rapier/src/physics/physics_replace_proxies.rs similarity index 99% rename from examples/common/src/core/physics/physics_replace_proxies.rs rename to examples/common_rapier/src/physics/physics_replace_proxies.rs index 498c482..de019fe 100644 --- a/examples/common/src/core/physics/physics_replace_proxies.rs +++ b/examples/common_rapier/src/physics/physics_replace_proxies.rs @@ -26,7 +26,7 @@ pub enum AutoAABBCollider { // replaces all physics stand-ins with the actual rapier types #[allow(clippy::type_complexity)] -pub fn physics_replace_proxies( +pub(crate) fn physics_replace_proxies( meshes: Res>, mesh_handles: Query<&Handle>, mut proxy_colliders: Query< diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/utils.rs b/examples/common_rapier/src/physics/utils.rs similarity index 100% rename from examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/utils.rs rename to examples/common_rapier/src/physics/utils.rs diff --git a/examples/common_xpbd/Cargo.toml b/examples/common_xpbd/Cargo.toml new file mode 100644 index 0000000..2582a73 --- /dev/null +++ b/examples/common_xpbd/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "bevy_gltf_worlflow_examples_common_xpbd" +version = "0.1.0" +edition = "2021" +license = "MIT OR Apache-2.0" + +[features] +blueprints = ["dep:bevy_gltf_blueprints"] +default = ["blueprints"] + + +[dependencies] +bevy = { version = "0.13", features = ["dynamic_linking"] } +bevy_gltf_worlflow_examples_common = { path = "../common" } +bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } +bevy_xpbd_3d = { version = "0.4" } +bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] } +bevy_editor_pls = { version = "0.8" } +rand = "0.8.5" diff --git a/examples/common_xpbd/src/lib.rs b/examples/common_xpbd/src/lib.rs new file mode 100644 index 0000000..0df818d --- /dev/null +++ b/examples/common_xpbd/src/lib.rs @@ -0,0 +1,13 @@ +use bevy::prelude::*; +use bevy_gltf_worlflow_examples_common::CommonPlugin as CommonBasePlugin; + +pub use bevy_gltf_worlflow_examples_common::*; + +mod physics; + +pub struct CommonPlugin; +impl Plugin for CommonPlugin { + fn build(&self, app: &mut App) { + app.add_plugins((physics::plugin, CommonBasePlugin)); + } +} diff --git a/examples/common_xpbd/src/physics/controls.rs b/examples/common_xpbd/src/physics/controls.rs new file mode 100644 index 0000000..8fd71d8 --- /dev/null +++ b/examples/common_xpbd/src/physics/controls.rs @@ -0,0 +1,30 @@ +use bevy::ecs::system::Res; +use bevy::gizmos::config::GizmoConfigStore; +use bevy::input::keyboard::KeyCode; +use bevy::input::ButtonInput; +use bevy::log::info; +use bevy::{prelude::ResMut, time::Time}; + +use bevy_xpbd_3d::prelude::Physics; +use bevy_xpbd_3d::prelude::*; + +pub(crate) fn pause_physics(mut time: ResMut>) { + info!("pausing physics"); + time.pause(); +} + +pub(crate) fn resume_physics(mut time: ResMut>) { + info!("unpausing physics"); + time.unpause(); +} + +pub(crate) fn toggle_physics_debug( + mut config_store: ResMut, + keycode: Res>, +) { + if keycode.just_pressed(KeyCode::KeyD) { + let config = config_store.config_mut::().0; + config.enabled = !config.enabled; + // config.aabb_color = Some(Color::WHITE); + } +} diff --git a/examples/common_xpbd/src/physics/mod.rs b/examples/common_xpbd/src/physics/mod.rs new file mode 100644 index 0000000..8d6b701 --- /dev/null +++ b/examples/common_xpbd/src/physics/mod.rs @@ -0,0 +1,26 @@ +pub(crate) mod physics_replace_proxies; +pub(crate) use physics_replace_proxies::*; + +pub(crate) mod utils; + +pub(crate) mod controls; +pub(crate) use controls::*; + +use bevy::prelude::*; +use bevy_xpbd_3d::prelude::*; + +use bevy_gltf_blueprints::GltfBlueprintsSet; +use bevy_gltf_worlflow_examples_common::state::GameState; + +pub(crate) fn plugin(app: &mut App) { + app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default())) + .register_type::() + .register_type::() + .add_systems( + Update, + physics_replace_proxies.after(GltfBlueprintsSet::AfterSpawn), + ) + .add_systems(Update, toggle_physics_debug) + .add_systems(OnEnter(GameState::InGame), resume_physics) + .add_systems(OnExit(GameState::InGame), pause_physics); +} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/physics_replace_proxies.rs b/examples/common_xpbd/src/physics/physics_replace_proxies.rs similarity index 96% rename from examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/physics_replace_proxies.rs rename to examples/common_xpbd/src/physics/physics_replace_proxies.rs index 5ec77f3..6f93740 100644 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/physics/physics_replace_proxies.rs +++ b/examples/common_xpbd/src/physics/physics_replace_proxies.rs @@ -25,7 +25,7 @@ pub enum AutoAABBCollider { // replaces all physics stand-ins with the actual xpbd types #[allow(clippy::type_complexity)] -pub fn physics_replace_proxies( +pub(crate) fn physics_replace_proxies( meshes: Res>, mesh_handles: Query<&Handle>, mut proxy_colliders: Query< @@ -48,7 +48,7 @@ pub fn physics_replace_proxies( match collider_proxy { Collider::Ball(radius) => { info!("generating collider from proxy: ball"); - xpbd_collider = XpbdCollider::ball(*radius); + xpbd_collider = XpbdCollider::sphere(*radius); commands.entity(entity) .insert(xpbd_collider) //.insert(ActiveEvents::COLLISION_EVENTS) // FIXME: this is just for demo purposes (also is there something like that in xpbd ?) !!! diff --git a/examples/common/src/core/physics/utils.rs b/examples/common_xpbd/src/physics/utils.rs similarity index 100% rename from examples/common/src/core/physics/utils.rs rename to examples/common_xpbd/src/physics/utils.rs diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ffcfdc7..195f5da 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = '1.75.0' +channel = 'stable' diff --git a/testing/bevy_example/Cargo.toml b/testing/bevy_example/Cargo.toml index 9b8d995..3dbc4ca 100644 --- a/testing/bevy_example/Cargo.toml +++ b/testing/bevy_example/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -bevy="0.12" +bevy = { version = "0.13", features = ["dynamic_linking"] } bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints" } bevy_registry_export = { path = "../../crates/bevy_registry_export" } -bevy_gltf_worlflow_examples_common = { path = "../../examples/common" } +bevy_gltf_worlflow_examples_common_rapier = { path = "../../examples/common_rapier" } -bevy_rapier3d = { version = "0.23.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.18", features = ["standard_dynamic_assets" ]} -bevy_editor_pls = { version = "0.6" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] } +bevy_editor_pls = { version = "0.8" } rand = "0.8.5" diff --git a/testing/bevy_example/assets/registry.json b/testing/bevy_example/assets/registry.json index e104314..65dea5f 100644 --- a/testing/bevy_example/assets/registry.json +++ b/testing/bevy_example/assets/registry.json @@ -71,16 +71,29 @@ "type": "array", "typeInfo": "List" }, - "alloc::vec::Vec": { + "alloc::vec::Vec": { "isComponent": false, "isResource": false, "items": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_animation::VariableCurve" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, "short_name": "Vec", - "title": "alloc::vec::Vec", + "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -136,6 +149,32 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Quat" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "short_name": "Vec", + "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, "bevy_animation::AnimationClip": { "additionalProperties": false, "isComponent": false, @@ -192,6 +231,116 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_animation::Interpolation": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Linear", + "Step", + "CubicSpline" + ], + "short_name": "Interpolation", + "title": "bevy_animation::Interpolation", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_animation::Keyframes": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Rotation", + "title": "Rotation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Translation", + "title": "Translation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Scale", + "title": "Scale", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Weights", + "title": "Weights", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Keyframes", + "title": "bevy_animation::Keyframes", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_animation::VariableCurve": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "interpolation": { + "type": { + "$ref": "#/$defs/bevy_animation::Interpolation" + } + }, + "keyframe_timestamps": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "keyframes": { + "type": { + "$ref": "#/$defs/bevy_animation::Keyframes" + } + } + }, + "required": [ + "keyframe_timestamps", + "keyframes", + "interpolation" + ], + "short_name": "VariableCurve", + "title": "bevy_animation::VariableCurve", + "type": "object", + "typeInfo": "Struct" + }, "bevy_asset::handle::Handle<()>": { "isComponent": true, "isResource": false, @@ -1028,7 +1177,7 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::handle::Handle": { + "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, "oneOf": [ @@ -1051,7 +1200,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" + "$ref": "#/$defs/bevy_asset::id::AssetId" } } ], @@ -1061,8 +1210,8 @@ "typeInfo": "Tuple" } ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", + "short_name": "Handle", + "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, @@ -2116,7 +2265,7 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::id::AssetId": { + "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, "oneOf": [ @@ -2157,8 +2306,8 @@ "typeInfo": "Struct" } ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", + "short_name": "AssetId", + "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, @@ -2208,6 +2357,152 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_asset::path::AssetPath<'static>": { + "isComponent": false, + "isResource": false, + "short_name": "AssetPath<'static>", + "title": "bevy_asset::path::AssetPath<'static>", + "type": "object", + "typeInfo": "Value" + }, + "bevy_audio::audio::DefaultSpatialScale": { + "isComponent": false, + "isResource": true, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "DefaultSpatialScale", + "title": "bevy_audio::audio::DefaultSpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_audio::audio::GlobalVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "properties": { + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "volume" + ], + "short_name": "GlobalVolume", + "title": "bevy_audio::audio::GlobalVolume", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::PlaybackMode": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Once", + "Loop", + "Despawn", + "Remove" + ], + "short_name": "PlaybackMode", + "title": "bevy_audio::audio::PlaybackMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_audio::audio::PlaybackSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "mode": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::PlaybackMode" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial_scale": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "speed": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "mode", + "volume", + "speed", + "paused", + "spatial" + ], + "short_name": "PlaybackSettings", + "title": "bevy_audio::audio::PlaybackSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::SpatialListener": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "left_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "right_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "left_ear_offset", + "right_ear_offset" + ], + "short_name": "SpatialListener", + "title": "bevy_audio::audio::SpatialListener", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::Volume": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Volume", + "title": "bevy_audio::audio::Volume", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_core::name::Name": { "additionalProperties": false, "isComponent": true, @@ -2319,52 +2614,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_core_pipeline::clear_color::ClearColor": { - "isComponent": false, - "isResource": true, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - ], - "short_name": "ClearColor", - "title": "bevy_core_pipeline::clear_color::ClearColor", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_core_pipeline::clear_color::ClearColorConfig": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "title": "Default" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - ], - "short_name": "Custom", - "title": "Custom", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "None" - } - ], - "short_name": "ClearColorConfig", - "title": "bevy_core_pipeline::clear_color::ClearColorConfig", - "type": "object", - "typeInfo": "Enum" - }, "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings": { "additionalProperties": false, "isComponent": true, @@ -2400,16 +2649,8 @@ "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "clear_color": { - "type": { - "$ref": "#/$defs/bevy_core_pipeline::clear_color::ClearColorConfig" - } - } - }, - "required": [ - "clear_color" - ], + "properties": {}, + "required": [], "short_name": "Camera2d", "title": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "type": "object", @@ -2420,11 +2661,6 @@ "isComponent": true, "isResource": false, "properties": { - "clear_color": { - "type": { - "$ref": "#/$defs/bevy_core_pipeline::clear_color::ClearColorConfig" - } - }, "depth_load_op": { "type": { "$ref": "#/$defs/bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp" @@ -2447,7 +2683,6 @@ } }, "required": [ - "clear_color", "depth_load_op", "depth_texture_usages", "screen_space_specular_transmission_steps", @@ -2485,6 +2720,36 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Camera3dDepthTextureUsage", + "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality": { + "isComponent": false, + "isResource": true, + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "ScreenSpaceTransmissionQuality", + "title": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", + "type": "string", + "typeInfo": "Enum" + }, "bevy_core_pipeline::fxaa::Fxaa": { "additionalProperties": false, "isComponent": true, @@ -2516,6 +2781,17 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::prepass::DeferredPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "DeferredPrepass", + "title": "bevy_core_pipeline::prepass::DeferredPrepass", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core_pipeline::prepass::DepthPrepass": { "additionalProperties": false, "isComponent": false, @@ -2527,6 +2803,17 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::prepass::MotionVectorPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "MotionVectorPrepass", + "title": "bevy_core_pipeline::prepass::MotionVectorPrepass", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core_pipeline::prepass::NormalPrepass": { "additionalProperties": false, "isComponent": false, @@ -2568,11 +2855,71 @@ "type": "string", "typeInfo": "Enum" }, - "bevy_ecs::Entity": { + "bevy_ecs::component::ComponentId": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/usize" + } + } + ], + "short_name": "ComponentId", + "title": "bevy_ecs::component::ComponentId", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ecs::component::ComponentTicks": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "added": { + "type": { + "$ref": "#/$defs/bevy_ecs::component::Tick" + } + }, + "changed": { + "type": { + "$ref": "#/$defs/bevy_ecs::component::Tick" + } + } + }, + "required": [ + "added", + "changed" + ], + "short_name": "ComponentTicks", + "title": "bevy_ecs::component::ComponentTicks", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ecs::component::Tick": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "tick": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "tick" + ], + "short_name": "Tick", + "title": "bevy_ecs::component::Tick", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ecs::entity::Entity": { "isComponent": false, "isResource": false, "short_name": "Entity", - "title": "bevy_ecs::Entity", + "title": "bevy_ecs::entity::Entity", "type": "object", "typeInfo": "Value" }, @@ -2588,7 +2935,7 @@ }, "scale_factor": { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } } }, @@ -3083,6 +3430,73 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_gizmos::aabb::AabbGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "default_color": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "draw_all" + ], + "short_name": "AabbGizmoConfigGroup", + "title": "bevy_gizmos::aabb::AabbGizmoConfigGroup", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_perspective": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "render_layers": { + "type": { + "$ref": "#/$defs/bevy_render::view::visibility::render_layers::RenderLayers" + } + } + }, + "required": [ + "enabled", + "line_width", + "line_perspective", + "depth_bias", + "render_layers" + ], + "short_name": "GizmoConfig", + "title": "bevy_gizmos::config::GizmoConfig", + "type": "object", + "typeInfo": "Struct" + }, "bevy_gltf::GltfExtras": { "additionalProperties": false, "isComponent": true, @@ -3173,6 +3587,86 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_gltf_components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "title": "bevy_gltf_components::GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "title": "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings": { "additionalProperties": false, "isComponent": true, @@ -3230,51 +3724,29 @@ "type": "array", "typeInfo": "TupleStruct" }, - "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::AmbientLightSettings": { + "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "brightness": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color", - "brightness" - ], - "short_name": "AmbientLightSettings", - "title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::AmbientLightSettings", + "properties": {}, + "required": [], + "short_name": "Pickable", + "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::ShadowmapSettings": { + "bevy_gltf_worlflow_examples_common::game::player::Player": { "additionalProperties": false, "isComponent": true, "isResource": false, - "properties": { - "size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "size" - ], - "short_name": "ShadowmapSettings", - "title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::ShadowmapSettings", + "properties": {}, + "required": [], + "short_name": "Player", + "title": "bevy_gltf_worlflow_examples_common::game::player::Player", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::AutoAABBCollider": { + "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": { "isComponent": true, "isResource": false, "oneOf": [ @@ -3283,11 +3755,11 @@ "Capsule" ], "short_name": "AutoAABBCollider", - "title": "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::AutoAABBCollider", + "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider", "type": "string", "typeInfo": "Enum" }, - "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::Collider": { + "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": { "isComponent": true, "isResource": false, "oneOf": [ @@ -3348,32 +3820,10 @@ } ], "short_name": "Collider", - "title": "bevy_gltf_worlflow_examples_common::core::physics::physics_replace_proxies::Collider", + "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider", "type": "object", "typeInfo": "Enum" }, - "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Pickable", - "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::game::player::Player": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Player", - "title": "bevy_gltf_worlflow_examples_common::game::player::Player", - "type": "object", - "typeInfo": "Struct" - }, "bevy_hierarchy::components::children::Children": { "isComponent": true, "isResource": false, @@ -3381,7 +3831,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/smallvec::SmallVec<[bevy_ecs::Entity; 8]>" + "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" } } ], @@ -3397,7 +3847,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } ], @@ -3810,177 +4260,1580 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_input::keyboard::Key": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Character", + "title": "Character", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKey" + } + } + ], + "short_name": "Unidentified", + "title": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + ], + "short_name": "Dead", + "title": "Dead", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "Alt" + }, + { + "title": "AltGraph" + }, + { + "title": "CapsLock" + }, + { + "title": "Control" + }, + { + "title": "Fn" + }, + { + "title": "FnLock" + }, + { + "title": "NumLock" + }, + { + "title": "ScrollLock" + }, + { + "title": "Shift" + }, + { + "title": "Symbol" + }, + { + "title": "SymbolLock" + }, + { + "title": "Meta" + }, + { + "title": "Hyper" + }, + { + "title": "Super" + }, + { + "title": "Enter" + }, + { + "title": "Tab" + }, + { + "title": "Space" + }, + { + "title": "ArrowDown" + }, + { + "title": "ArrowLeft" + }, + { + "title": "ArrowRight" + }, + { + "title": "ArrowUp" + }, + { + "title": "End" + }, + { + "title": "Home" + }, + { + "title": "PageDown" + }, + { + "title": "PageUp" + }, + { + "title": "Backspace" + }, + { + "title": "Clear" + }, + { + "title": "Copy" + }, + { + "title": "CrSel" + }, + { + "title": "Cut" + }, + { + "title": "Delete" + }, + { + "title": "EraseEof" + }, + { + "title": "ExSel" + }, + { + "title": "Insert" + }, + { + "title": "Paste" + }, + { + "title": "Redo" + }, + { + "title": "Undo" + }, + { + "title": "Accept" + }, + { + "title": "Again" + }, + { + "title": "Attn" + }, + { + "title": "Cancel" + }, + { + "title": "ContextMenu" + }, + { + "title": "Escape" + }, + { + "title": "Execute" + }, + { + "title": "Find" + }, + { + "title": "Help" + }, + { + "title": "Pause" + }, + { + "title": "Play" + }, + { + "title": "Props" + }, + { + "title": "Select" + }, + { + "title": "ZoomIn" + }, + { + "title": "ZoomOut" + }, + { + "title": "BrightnessDown" + }, + { + "title": "BrightnessUp" + }, + { + "title": "Eject" + }, + { + "title": "LogOff" + }, + { + "title": "Power" + }, + { + "title": "PowerOff" + }, + { + "title": "PrintScreen" + }, + { + "title": "Hibernate" + }, + { + "title": "Standby" + }, + { + "title": "WakeUp" + }, + { + "title": "AllCandidates" + }, + { + "title": "Alphanumeric" + }, + { + "title": "CodeInput" + }, + { + "title": "Compose" + }, + { + "title": "Convert" + }, + { + "title": "FinalMode" + }, + { + "title": "GroupFirst" + }, + { + "title": "GroupLast" + }, + { + "title": "GroupNext" + }, + { + "title": "GroupPrevious" + }, + { + "title": "ModeChange" + }, + { + "title": "NextCandidate" + }, + { + "title": "NonConvert" + }, + { + "title": "PreviousCandidate" + }, + { + "title": "Process" + }, + { + "title": "SingleCandidate" + }, + { + "title": "HangulMode" + }, + { + "title": "HanjaMode" + }, + { + "title": "JunjaMode" + }, + { + "title": "Eisu" + }, + { + "title": "Hankaku" + }, + { + "title": "Hiragana" + }, + { + "title": "HiraganaKatakana" + }, + { + "title": "KanaMode" + }, + { + "title": "KanjiMode" + }, + { + "title": "Katakana" + }, + { + "title": "Romaji" + }, + { + "title": "Zenkaku" + }, + { + "title": "ZenkakuHankaku" + }, + { + "title": "Soft1" + }, + { + "title": "Soft2" + }, + { + "title": "Soft3" + }, + { + "title": "Soft4" + }, + { + "title": "ChannelDown" + }, + { + "title": "ChannelUp" + }, + { + "title": "Close" + }, + { + "title": "MailForward" + }, + { + "title": "MailReply" + }, + { + "title": "MailSend" + }, + { + "title": "MediaClose" + }, + { + "title": "MediaFastForward" + }, + { + "title": "MediaPause" + }, + { + "title": "MediaPlay" + }, + { + "title": "MediaPlayPause" + }, + { + "title": "MediaRecord" + }, + { + "title": "MediaRewind" + }, + { + "title": "MediaStop" + }, + { + "title": "MediaTrackNext" + }, + { + "title": "MediaTrackPrevious" + }, + { + "title": "New" + }, + { + "title": "Open" + }, + { + "title": "Print" + }, + { + "title": "Save" + }, + { + "title": "SpellCheck" + }, + { + "title": "Key11" + }, + { + "title": "Key12" + }, + { + "title": "AudioBalanceLeft" + }, + { + "title": "AudioBalanceRight" + }, + { + "title": "AudioBassBoostDown" + }, + { + "title": "AudioBassBoostToggle" + }, + { + "title": "AudioBassBoostUp" + }, + { + "title": "AudioFaderFront" + }, + { + "title": "AudioFaderRear" + }, + { + "title": "AudioSurroundModeNext" + }, + { + "title": "AudioTrebleDown" + }, + { + "title": "AudioTrebleUp" + }, + { + "title": "AudioVolumeDown" + }, + { + "title": "AudioVolumeUp" + }, + { + "title": "AudioVolumeMute" + }, + { + "title": "MicrophoneToggle" + }, + { + "title": "MicrophoneVolumeDown" + }, + { + "title": "MicrophoneVolumeUp" + }, + { + "title": "MicrophoneVolumeMute" + }, + { + "title": "SpeechCorrectionList" + }, + { + "title": "SpeechInputToggle" + }, + { + "title": "LaunchApplication1" + }, + { + "title": "LaunchApplication2" + }, + { + "title": "LaunchCalendar" + }, + { + "title": "LaunchContacts" + }, + { + "title": "LaunchMail" + }, + { + "title": "LaunchMediaPlayer" + }, + { + "title": "LaunchMusicPlayer" + }, + { + "title": "LaunchPhone" + }, + { + "title": "LaunchScreenSaver" + }, + { + "title": "LaunchSpreadsheet" + }, + { + "title": "LaunchWebBrowser" + }, + { + "title": "LaunchWebCam" + }, + { + "title": "LaunchWordProcessor" + }, + { + "title": "BrowserBack" + }, + { + "title": "BrowserFavorites" + }, + { + "title": "BrowserForward" + }, + { + "title": "BrowserHome" + }, + { + "title": "BrowserRefresh" + }, + { + "title": "BrowserSearch" + }, + { + "title": "BrowserStop" + }, + { + "title": "AppSwitch" + }, + { + "title": "Call" + }, + { + "title": "Camera" + }, + { + "title": "CameraFocus" + }, + { + "title": "EndCall" + }, + { + "title": "GoBack" + }, + { + "title": "GoHome" + }, + { + "title": "HeadsetHook" + }, + { + "title": "LastNumberRedial" + }, + { + "title": "Notification" + }, + { + "title": "MannerMode" + }, + { + "title": "VoiceDial" + }, + { + "title": "TV" + }, + { + "title": "TV3DMode" + }, + { + "title": "TVAntennaCable" + }, + { + "title": "TVAudioDescription" + }, + { + "title": "TVAudioDescriptionMixDown" + }, + { + "title": "TVAudioDescriptionMixUp" + }, + { + "title": "TVContentsMenu" + }, + { + "title": "TVDataService" + }, + { + "title": "TVInput" + }, + { + "title": "TVInputComponent1" + }, + { + "title": "TVInputComponent2" + }, + { + "title": "TVInputComposite1" + }, + { + "title": "TVInputComposite2" + }, + { + "title": "TVInputHDMI1" + }, + { + "title": "TVInputHDMI2" + }, + { + "title": "TVInputHDMI3" + }, + { + "title": "TVInputHDMI4" + }, + { + "title": "TVInputVGA1" + }, + { + "title": "TVMediaContext" + }, + { + "title": "TVNetwork" + }, + { + "title": "TVNumberEntry" + }, + { + "title": "TVPower" + }, + { + "title": "TVRadioService" + }, + { + "title": "TVSatellite" + }, + { + "title": "TVSatelliteBS" + }, + { + "title": "TVSatelliteCS" + }, + { + "title": "TVSatelliteToggle" + }, + { + "title": "TVTerrestrialAnalog" + }, + { + "title": "TVTerrestrialDigital" + }, + { + "title": "TVTimer" + }, + { + "title": "AVRInput" + }, + { + "title": "AVRPower" + }, + { + "title": "ColorF0Red" + }, + { + "title": "ColorF1Green" + }, + { + "title": "ColorF2Yellow" + }, + { + "title": "ColorF3Blue" + }, + { + "title": "ColorF4Grey" + }, + { + "title": "ColorF5Brown" + }, + { + "title": "ClosedCaptionToggle" + }, + { + "title": "Dimmer" + }, + { + "title": "DisplaySwap" + }, + { + "title": "DVR" + }, + { + "title": "Exit" + }, + { + "title": "FavoriteClear0" + }, + { + "title": "FavoriteClear1" + }, + { + "title": "FavoriteClear2" + }, + { + "title": "FavoriteClear3" + }, + { + "title": "FavoriteRecall0" + }, + { + "title": "FavoriteRecall1" + }, + { + "title": "FavoriteRecall2" + }, + { + "title": "FavoriteRecall3" + }, + { + "title": "FavoriteStore0" + }, + { + "title": "FavoriteStore1" + }, + { + "title": "FavoriteStore2" + }, + { + "title": "FavoriteStore3" + }, + { + "title": "Guide" + }, + { + "title": "GuideNextDay" + }, + { + "title": "GuidePreviousDay" + }, + { + "title": "Info" + }, + { + "title": "InstantReplay" + }, + { + "title": "Link" + }, + { + "title": "ListProgram" + }, + { + "title": "LiveContent" + }, + { + "title": "Lock" + }, + { + "title": "MediaApps" + }, + { + "title": "MediaAudioTrack" + }, + { + "title": "MediaLast" + }, + { + "title": "MediaSkipBackward" + }, + { + "title": "MediaSkipForward" + }, + { + "title": "MediaStepBackward" + }, + { + "title": "MediaStepForward" + }, + { + "title": "MediaTopMenu" + }, + { + "title": "NavigateIn" + }, + { + "title": "NavigateNext" + }, + { + "title": "NavigateOut" + }, + { + "title": "NavigatePrevious" + }, + { + "title": "NextFavoriteChannel" + }, + { + "title": "NextUserProfile" + }, + { + "title": "OnDemand" + }, + { + "title": "Pairing" + }, + { + "title": "PinPDown" + }, + { + "title": "PinPMove" + }, + { + "title": "PinPToggle" + }, + { + "title": "PinPUp" + }, + { + "title": "PlaySpeedDown" + }, + { + "title": "PlaySpeedReset" + }, + { + "title": "PlaySpeedUp" + }, + { + "title": "RandomToggle" + }, + { + "title": "RcLowBattery" + }, + { + "title": "RecordSpeedNext" + }, + { + "title": "RfBypass" + }, + { + "title": "ScanChannelsToggle" + }, + { + "title": "ScreenModeNext" + }, + { + "title": "Settings" + }, + { + "title": "SplitScreenToggle" + }, + { + "title": "STBInput" + }, + { + "title": "STBPower" + }, + { + "title": "Subtitle" + }, + { + "title": "Teletext" + }, + { + "title": "VideoModeNext" + }, + { + "title": "Wink" + }, + { + "title": "ZoomToggle" + }, + { + "title": "F1" + }, + { + "title": "F2" + }, + { + "title": "F3" + }, + { + "title": "F4" + }, + { + "title": "F5" + }, + { + "title": "F6" + }, + { + "title": "F7" + }, + { + "title": "F8" + }, + { + "title": "F9" + }, + { + "title": "F10" + }, + { + "title": "F11" + }, + { + "title": "F12" + }, + { + "title": "F13" + }, + { + "title": "F14" + }, + { + "title": "F15" + }, + { + "title": "F16" + }, + { + "title": "F17" + }, + { + "title": "F18" + }, + { + "title": "F19" + }, + { + "title": "F20" + }, + { + "title": "F21" + }, + { + "title": "F22" + }, + { + "title": "F23" + }, + { + "title": "F24" + }, + { + "title": "F25" + }, + { + "title": "F26" + }, + { + "title": "F27" + }, + { + "title": "F28" + }, + { + "title": "F29" + }, + { + "title": "F30" + }, + { + "title": "F31" + }, + { + "title": "F32" + }, + { + "title": "F33" + }, + { + "title": "F34" + }, + { + "title": "F35" + } + ], + "short_name": "Key", + "title": "bevy_input::keyboard::Key", + "type": "object", + "typeInfo": "Enum" + }, "bevy_input::keyboard::KeyCode": { "isComponent": false, "isResource": false, "oneOf": [ - "Key1", - "Key2", - "Key3", - "Key4", - "Key5", - "Key6", - "Key7", - "Key8", - "Key9", - "Key0", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "Escape", - "F1", - "F2", - "F3", - "F4", - "F5", - "F6", - "F7", - "F8", - "F9", - "F10", - "F11", - "F12", - "F13", - "F14", - "F15", - "F16", - "F17", - "F18", - "F19", - "F20", - "F21", - "F22", - "F23", - "F24", - "Snapshot", - "Scroll", - "Pause", - "Insert", - "Home", - "Delete", - "End", - "PageDown", - "PageUp", - "Left", - "Up", - "Right", - "Down", - "Back", - "Return", - "Space", - "Compose", - "Caret", - "Numlock", - "Numpad0", - "Numpad1", - "Numpad2", - "Numpad3", - "Numpad4", - "Numpad5", - "Numpad6", - "Numpad7", - "Numpad8", - "Numpad9", - "AbntC1", - "AbntC2", - "NumpadAdd", - "Apostrophe", - "Apps", - "Asterisk", - "Plus", - "At", - "Ax", - "Backslash", - "Calculator", - "Capital", - "Colon", - "Comma", - "Convert", - "NumpadDecimal", - "NumpadDivide", - "Equals", - "Grave", - "Kana", - "Kanji", - "AltLeft", - "BracketLeft", - "ControlLeft", - "ShiftLeft", - "SuperLeft", - "Mail", - "MediaSelect", - "MediaStop", - "Minus", - "NumpadMultiply", - "Mute", - "MyComputer", - "NavigateForward", - "NavigateBackward", - "NextTrack", - "NoConvert", - "NumpadComma", - "NumpadEnter", - "NumpadEquals", - "Oem102", - "Period", - "PlayPause", - "Power", - "PrevTrack", - "AltRight", - "BracketRight", - "ControlRight", - "ShiftRight", - "SuperRight", - "Semicolon", - "Slash", - "Sleep", - "Stop", - "NumpadSubtract", - "Sysrq", - "Tab", - "Underline", - "Unlabeled", - "VolumeDown", - "VolumeUp", - "Wake", - "WebBack", - "WebFavorites", - "WebForward", - "WebHome", - "WebRefresh", - "WebSearch", - "WebStop", - "Yen", - "Copy", - "Paste", - "Cut" + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKeyCode" + } + } + ], + "short_name": "Unidentified", + "title": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "Backquote" + }, + { + "title": "Backslash" + }, + { + "title": "BracketLeft" + }, + { + "title": "BracketRight" + }, + { + "title": "Comma" + }, + { + "title": "Digit0" + }, + { + "title": "Digit1" + }, + { + "title": "Digit2" + }, + { + "title": "Digit3" + }, + { + "title": "Digit4" + }, + { + "title": "Digit5" + }, + { + "title": "Digit6" + }, + { + "title": "Digit7" + }, + { + "title": "Digit8" + }, + { + "title": "Digit9" + }, + { + "title": "Equal" + }, + { + "title": "IntlBackslash" + }, + { + "title": "IntlRo" + }, + { + "title": "IntlYen" + }, + { + "title": "KeyA" + }, + { + "title": "KeyB" + }, + { + "title": "KeyC" + }, + { + "title": "KeyD" + }, + { + "title": "KeyE" + }, + { + "title": "KeyF" + }, + { + "title": "KeyG" + }, + { + "title": "KeyH" + }, + { + "title": "KeyI" + }, + { + "title": "KeyJ" + }, + { + "title": "KeyK" + }, + { + "title": "KeyL" + }, + { + "title": "KeyM" + }, + { + "title": "KeyN" + }, + { + "title": "KeyO" + }, + { + "title": "KeyP" + }, + { + "title": "KeyQ" + }, + { + "title": "KeyR" + }, + { + "title": "KeyS" + }, + { + "title": "KeyT" + }, + { + "title": "KeyU" + }, + { + "title": "KeyV" + }, + { + "title": "KeyW" + }, + { + "title": "KeyX" + }, + { + "title": "KeyY" + }, + { + "title": "KeyZ" + }, + { + "title": "Minus" + }, + { + "title": "Period" + }, + { + "title": "Quote" + }, + { + "title": "Semicolon" + }, + { + "title": "Slash" + }, + { + "title": "AltLeft" + }, + { + "title": "AltRight" + }, + { + "title": "Backspace" + }, + { + "title": "CapsLock" + }, + { + "title": "ContextMenu" + }, + { + "title": "ControlLeft" + }, + { + "title": "ControlRight" + }, + { + "title": "Enter" + }, + { + "title": "SuperLeft" + }, + { + "title": "SuperRight" + }, + { + "title": "ShiftLeft" + }, + { + "title": "ShiftRight" + }, + { + "title": "Space" + }, + { + "title": "Tab" + }, + { + "title": "Convert" + }, + { + "title": "KanaMode" + }, + { + "title": "Lang1" + }, + { + "title": "Lang2" + }, + { + "title": "Lang3" + }, + { + "title": "Lang4" + }, + { + "title": "Lang5" + }, + { + "title": "NonConvert" + }, + { + "title": "Delete" + }, + { + "title": "End" + }, + { + "title": "Help" + }, + { + "title": "Home" + }, + { + "title": "Insert" + }, + { + "title": "PageDown" + }, + { + "title": "PageUp" + }, + { + "title": "ArrowDown" + }, + { + "title": "ArrowLeft" + }, + { + "title": "ArrowRight" + }, + { + "title": "ArrowUp" + }, + { + "title": "NumLock" + }, + { + "title": "Numpad0" + }, + { + "title": "Numpad1" + }, + { + "title": "Numpad2" + }, + { + "title": "Numpad3" + }, + { + "title": "Numpad4" + }, + { + "title": "Numpad5" + }, + { + "title": "Numpad6" + }, + { + "title": "Numpad7" + }, + { + "title": "Numpad8" + }, + { + "title": "Numpad9" + }, + { + "title": "NumpadAdd" + }, + { + "title": "NumpadBackspace" + }, + { + "title": "NumpadClear" + }, + { + "title": "NumpadClearEntry" + }, + { + "title": "NumpadComma" + }, + { + "title": "NumpadDecimal" + }, + { + "title": "NumpadDivide" + }, + { + "title": "NumpadEnter" + }, + { + "title": "NumpadEqual" + }, + { + "title": "NumpadHash" + }, + { + "title": "NumpadMemoryAdd" + }, + { + "title": "NumpadMemoryClear" + }, + { + "title": "NumpadMemoryRecall" + }, + { + "title": "NumpadMemoryStore" + }, + { + "title": "NumpadMemorySubtract" + }, + { + "title": "NumpadMultiply" + }, + { + "title": "NumpadParenLeft" + }, + { + "title": "NumpadParenRight" + }, + { + "title": "NumpadStar" + }, + { + "title": "NumpadSubtract" + }, + { + "title": "Escape" + }, + { + "title": "Fn" + }, + { + "title": "FnLock" + }, + { + "title": "PrintScreen" + }, + { + "title": "ScrollLock" + }, + { + "title": "Pause" + }, + { + "title": "BrowserBack" + }, + { + "title": "BrowserFavorites" + }, + { + "title": "BrowserForward" + }, + { + "title": "BrowserHome" + }, + { + "title": "BrowserRefresh" + }, + { + "title": "BrowserSearch" + }, + { + "title": "BrowserStop" + }, + { + "title": "Eject" + }, + { + "title": "LaunchApp1" + }, + { + "title": "LaunchApp2" + }, + { + "title": "LaunchMail" + }, + { + "title": "MediaPlayPause" + }, + { + "title": "MediaSelect" + }, + { + "title": "MediaStop" + }, + { + "title": "MediaTrackNext" + }, + { + "title": "MediaTrackPrevious" + }, + { + "title": "Power" + }, + { + "title": "Sleep" + }, + { + "title": "AudioVolumeDown" + }, + { + "title": "AudioVolumeMute" + }, + { + "title": "AudioVolumeUp" + }, + { + "title": "WakeUp" + }, + { + "title": "Meta" + }, + { + "title": "Hyper" + }, + { + "title": "Turbo" + }, + { + "title": "Abort" + }, + { + "title": "Resume" + }, + { + "title": "Suspend" + }, + { + "title": "Again" + }, + { + "title": "Copy" + }, + { + "title": "Cut" + }, + { + "title": "Find" + }, + { + "title": "Open" + }, + { + "title": "Paste" + }, + { + "title": "Props" + }, + { + "title": "Select" + }, + { + "title": "Undo" + }, + { + "title": "Hiragana" + }, + { + "title": "Katakana" + }, + { + "title": "F1" + }, + { + "title": "F2" + }, + { + "title": "F3" + }, + { + "title": "F4" + }, + { + "title": "F5" + }, + { + "title": "F6" + }, + { + "title": "F7" + }, + { + "title": "F8" + }, + { + "title": "F9" + }, + { + "title": "F10" + }, + { + "title": "F11" + }, + { + "title": "F12" + }, + { + "title": "F13" + }, + { + "title": "F14" + }, + { + "title": "F15" + }, + { + "title": "F16" + }, + { + "title": "F17" + }, + { + "title": "F18" + }, + { + "title": "F19" + }, + { + "title": "F20" + }, + { + "title": "F21" + }, + { + "title": "F22" + }, + { + "title": "F23" + }, + { + "title": "F24" + }, + { + "title": "F25" + }, + { + "title": "F26" + }, + { + "title": "F27" + }, + { + "title": "F28" + }, + { + "title": "F29" + }, + { + "title": "F30" + }, + { + "title": "F31" + }, + { + "title": "F32" + }, + { + "title": "F33" + }, + { + "title": "F34" + }, + { + "title": "F35" + } ], "short_name": "KeyCode", "title": "bevy_input::keyboard::KeyCode", - "type": "string", + "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::KeyboardInput": { @@ -3990,12 +5843,12 @@ "properties": { "key_code": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/bevy_input::keyboard::KeyCode" } }, - "scan_code": { + "logical_key": { "type": { - "$ref": "#/$defs/u32" + "$ref": "#/$defs/bevy_input::keyboard::Key" } }, "state": { @@ -4005,12 +5858,13 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, "required": [ - "scan_code", + "key_code", + "logical_key", "state", "window" ], @@ -4019,21 +5873,157 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_input::keyboard::ScanCode": { + "bevy_input::keyboard::NativeKey": { "isComponent": false, "isResource": false, - "items": false, - "prefixItems": [ + "oneOf": [ { - "type": { - "$ref": "#/$defs/u32" - } + "title": "Unidentified" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "title": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "title": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "title": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "title": "Xkb", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Web", + "title": "Web", + "type": "array", + "typeInfo": "Tuple" } ], - "short_name": "ScanCode", - "title": "bevy_input::keyboard::ScanCode", - "type": "array", - "typeInfo": "TupleStruct" + "short_name": "NativeKey", + "title": "bevy_input::keyboard::NativeKey", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::keyboard::NativeKeyCode": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Unidentified" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "title": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "title": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "title": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "title": "Xkb", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "NativeKeyCode", + "title": "bevy_input::keyboard::NativeKeyCode", + "type": "object", + "typeInfo": "Enum" }, "bevy_input::mouse::MouseButton": { "isComponent": false, @@ -4048,6 +6038,12 @@ { "title": "Middle" }, + { + "title": "Back" + }, + { + "title": "Forward" + }, { "items": false, "prefixItems": [ @@ -4085,7 +6081,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -4142,7 +6138,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, "x": { @@ -4246,11 +6242,17 @@ "type": { "$ref": "#/$defs/glam::Vec2" } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } } }, "required": [ "phase", "position", + "window", "id" ], "short_name": "TouchInput", @@ -4390,30 +6392,101 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::environment_map::EnvironmentMapLight": { - "additionalProperties": false, + "bevy_pbr::fog::FogFalloff": { "isComponent": false, "isResource": false, - "properties": { - "diffuse_map": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "end": { + "title": "end", + "type": { + "$ref": "#/$defs/f32" + } + }, + "start": { + "title": "start", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "start", + "end" + ], + "short_name": "Linear", + "title": "Linear", + "type": "object", + "typeInfo": "Struct" }, - "specular_map": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } + { + "additionalProperties": false, + "properties": { + "density": { + "title": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "Exponential", + "title": "Exponential", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "properties": { + "density": { + "title": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "ExponentialSquared", + "title": "ExponentialSquared", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "properties": { + "extinction": { + "title": "extinction", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "inscattering": { + "title": "inscattering", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "extinction", + "inscattering" + ], + "short_name": "Atmospheric", + "title": "Atmospheric", + "type": "object", + "typeInfo": "Struct" } - }, - "required": [ - "diffuse_map", - "specular_map" ], - "short_name": "EnvironmentMapLight", - "title": "bevy_pbr::environment_map::EnvironmentMapLight", + "short_name": "FogFalloff", + "title": "bevy_pbr::fog::FogFalloff", "type": "object", - "typeInfo": "Struct" + "typeInfo": "Enum" }, "bevy_pbr::fog::FogSettings": { "additionalProperties": false, @@ -4552,7 +6625,7 @@ "properties": { "cascades": { "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>" } } }, @@ -4941,6 +7014,73 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::light_probe::LightProbe": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": {}, + "required": [], + "short_name": "LightProbe", + "title": "bevy_pbr::light_probe::LightProbe", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::environment_map::EnvironmentMapLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "diffuse_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "specular_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "diffuse_map", + "specular_map", + "intensity" + ], + "short_name": "EnvironmentMapLight", + "title": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "voxels": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "voxels", + "intensity" + ], + "short_name": "IrradianceVolume", + "title": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", + "type": "object", + "typeInfo": "Struct" + }, "bevy_pbr::material::DefaultOpaqueRendererMethod": { "isComponent": false, "isResource": false, @@ -4957,6 +7097,50 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_pbr::material::OpaqueRendererMethod": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Forward", + "Deferred", + "Auto" + ], + "short_name": "OpaqueRendererMethod", + "title": "bevy_pbr::material::OpaqueRendererMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::parallax::ParallaxMappingMethod": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Occlusion" + }, + { + "additionalProperties": false, + "properties": { + "max_steps": { + "title": "max_steps", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "max_steps" + ], + "short_name": "Relief", + "title": "Relief", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ParallaxMappingMethod", + "title": "bevy_pbr::parallax::ParallaxMappingMethod", + "type": "object", + "typeInfo": "Enum" + }, "bevy_pbr::pbr_material::StandardMaterial": { "additionalProperties": false, "isComponent": false, @@ -5037,6 +7221,11 @@ "$ref": "#/$defs/f32" } }, + "lightmap_exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, "max_parallax_layer_count": { "type": { "$ref": "#/$defs/f32" @@ -5124,6 +7313,7 @@ "parallax_depth_scale", "parallax_mapping_method", "max_parallax_layer_count", + "lightmap_exposure", "opaque_render_method", "deferred_lighting_pass_id" ], @@ -5173,6 +7363,25 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::wireframe::WireframeColor": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + }, + "required": [ + "color" + ], + "short_name": "WireframeColor", + "title": "bevy_pbr::wireframe::WireframeColor", + "type": "object", + "typeInfo": "Struct" + }, "bevy_pbr::wireframe::WireframeConfig": { "additionalProperties": false, "isComponent": false, @@ -5495,7 +7704,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_utils::HashSet" + "$ref": "#/$defs/bevy_utils::HashSet" } } ], @@ -5671,6 +7880,11 @@ "isComponent": true, "isResource": false, "properties": { + "clear_color": { + "type": { + "$ref": "#/$defs/bevy_render::camera::clear_color::ClearColorConfig" + } + }, "hdr": { "type": { "$ref": "#/$defs/bool" @@ -5701,28 +7915,37 @@ "order", "is_active", "hdr", - "msaa_writeback" + "msaa_writeback", + "clear_color" ], "short_name": "Camera", "title": "bevy_render::camera::camera::Camera", "type": "object", "typeInfo": "Struct" }, + "bevy_render::camera::camera::CameraMainTextureUsages": { + "isComponent": true, + "isResource": false, + "short_name": "CameraMainTextureUsages", + "title": "bevy_render::camera::camera::CameraMainTextureUsages", + "type": "object", + "typeInfo": "Value" + }, "bevy_render::camera::camera::CameraRenderGraph": { "isComponent": true, "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::borrow::Cow" - } - } - ], "short_name": "CameraRenderGraph", "title": "bevy_render::camera::camera::CameraRenderGraph", - "type": "array", - "typeInfo": "TupleStruct" + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::camera::camera::Exposure": { + "isComponent": true, + "isResource": false, + "short_name": "Exposure", + "title": "bevy_render::camera::camera::Exposure", + "type": "object", + "typeInfo": "Value" }, "bevy_render::camera::camera::RenderTarget": { "isComponent": false, @@ -5807,6 +8030,52 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_render::camera::clear_color::ClearColor": { + "isComponent": false, + "isResource": true, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + ], + "short_name": "ClearColor", + "title": "bevy_render::camera::clear_color::ClearColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::clear_color::ClearColorConfig": { + "isComponent": false, + "isResource": false, + "oneOf": [ + { + "title": "Default" + }, + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::color::Color" + } + } + ], + "short_name": "Custom", + "title": "Custom", + "type": "array", + "typeInfo": "Tuple" + }, + { + "title": "None" + } + ], + "short_name": "ClearColorConfig", + "title": "bevy_render::camera::clear_color::ClearColorConfig", + "type": "object", + "typeInfo": "Enum" + }, "bevy_render::camera::projection::OrthographicProjection": { "additionalProperties": false, "isComponent": true, @@ -6298,6 +8567,11 @@ "isComponent": false, "isResource": false, "properties": { + "asset_usage": { + "type": { + "$ref": "#/$defs/bevy_render::render_asset::RenderAssetUsages" + } + }, "indices": { "type": { "$ref": "#/$defs/core::option::Option" @@ -6314,7 +8588,9 @@ } } }, - "required": [], + "required": [ + "asset_usage" + ], "short_name": "Mesh", "title": "bevy_render::mesh::mesh::Mesh", "type": "object", @@ -6332,7 +8608,7 @@ }, "joints": { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } }, @@ -6679,6 +8955,62 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_sprite::sprite::ImageScaleMode": { + "isComponent": true, + "isResource": false, + "oneOf": [ + { + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::TextureSlicer" + } + } + ], + "short_name": "Sliced", + "title": "Sliced", + "type": "array", + "typeInfo": "Tuple" + }, + { + "additionalProperties": false, + "properties": { + "stretch_value": { + "title": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + }, + "tile_x": { + "title": "tile_x", + "type": { + "$ref": "#/$defs/bool" + } + }, + "tile_y": { + "title": "tile_y", + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "tile_x", + "tile_y", + "stretch_value" + ], + "short_name": "Tiled", + "title": "Tiled", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ImageScaleMode", + "title": "bevy_sprite::sprite::ImageScaleMode", + "type": "object", + "typeInfo": "Enum" + }, "bevy_sprite::sprite::Sprite": { "additionalProperties": false, "isComponent": true, @@ -6727,6 +9059,31 @@ "typeInfo": "Struct" }, "bevy_sprite::texture_atlas::TextureAtlas": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "layout": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "layout", + "index" + ], + "short_name": "TextureAtlas", + "title": "bevy_sprite::texture_atlas::TextureAtlas", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_atlas::TextureAtlasLayout": { "additionalProperties": false, "isComponent": false, "isResource": false, @@ -6736,11 +9093,6 @@ "$ref": "#/$defs/glam::Vec2" } }, - "texture": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } - }, "texture_handles": { "type": { "$ref": "#/$defs/core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>" @@ -6753,60 +9105,48 @@ } }, "required": [ - "texture", "size", "textures" ], - "short_name": "TextureAtlas", - "title": "bevy_sprite::texture_atlas::TextureAtlas", + "short_name": "TextureAtlasLayout", + "title": "bevy_sprite::texture_atlas::TextureAtlasLayout", "type": "object", "typeInfo": "Struct" }, - "bevy_sprite::texture_atlas::TextureAtlasSprite": { + "bevy_sprite::texture_slice::slicer::TextureSlicer": { "additionalProperties": false, - "isComponent": true, + "isComponent": false, "isResource": false, "properties": { - "anchor": { + "border": { "type": { - "$ref": "#/$defs/bevy_sprite::sprite::Anchor" + "$ref": "#/$defs/bevy_sprite::texture_slice::border_rect::BorderRect" } }, - "color": { + "center_scale_mode": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" } }, - "custom_size": { + "max_corner_scale": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/f32" } }, - "flip_x": { + "sides_scale_mode": { "type": { - "$ref": "#/$defs/bool" - } - }, - "flip_y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "index": { - "type": { - "$ref": "#/$defs/usize" + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" } } }, "required": [ - "color", - "index", - "flip_x", - "flip_y", - "anchor" + "border", + "center_scale_mode", + "sides_scale_mode", + "max_corner_scale" ], - "short_name": "TextureAtlasSprite", - "title": "bevy_sprite::texture_atlas::TextureAtlasSprite", + "short_name": "TextureSlicer", + "title": "bevy_sprite::texture_slice::slicer::TextureSlicer", "type": "object", "typeInfo": "Struct" }, @@ -6867,14 +9207,27 @@ "type": "string", "typeInfo": "Enum" }, + "bevy_text::text::JustifyText": { + "isComponent": false, + "isResource": false, + "oneOf": [ + "Left", + "Center", + "Right" + ], + "short_name": "JustifyText", + "title": "bevy_text::text::JustifyText", + "type": "string", + "typeInfo": "Enum" + }, "bevy_text::text::Text": { "additionalProperties": false, "isComponent": true, "isResource": false, "properties": { - "alignment": { + "justify": { "type": { - "$ref": "#/$defs/bevy_text::text::TextAlignment" + "$ref": "#/$defs/bevy_text::text::JustifyText" } }, "linebreak_behavior": { @@ -6890,7 +9243,7 @@ }, "required": [ "sections", - "alignment", + "justify", "linebreak_behavior" ], "short_name": "Text", @@ -6898,19 +9251,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_text::text::TextAlignment": { - "isComponent": false, - "isResource": false, - "oneOf": [ - "Left", - "Center", - "Right" - ], - "short_name": "TextAlignment", - "title": "bevy_text::text::TextAlignment", - "type": "string", - "typeInfo": "Enum" - }, "bevy_text::text::TextSection": { "additionalProperties": false, "isComponent": false, @@ -7351,6 +9691,43 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_time::virt::Virtual": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "effective_speed": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "max_delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "relative_speed": { + "type": { + "$ref": "#/$defs/f64" + } + } + }, + "required": [ + "max_delta", + "paused", + "relative_speed", + "effective_speed" + ], + "short_name": "Virtual", + "title": "bevy_time::virt::Virtual", + "type": "object", + "typeInfo": "Struct" + }, "bevy_transform::components::global_transform::GlobalTransform": { "isComponent": true, "isResource": false, @@ -7405,7 +9782,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } } ], @@ -7414,25 +9791,6 @@ "type": "array", "typeInfo": "TupleStruct" }, - "bevy_ui::camera_config::UiCameraConfig": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "show_ui": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "show_ui" - ], - "short_name": "UiCameraConfig", - "title": "bevy_ui::camera_config::UiCameraConfig", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ui::focus::FocusPolicy": { "isComponent": true, "isResource": false, @@ -8040,7 +10398,7 @@ }, "tracks": { "type": { - "$ref": "#/$defs/smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" + "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" } } }, @@ -8293,6 +10651,22 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_ui::ui_node::TargetCamera": { + "isComponent": false, + "isResource": false, + "items": false, + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + ], + "short_name": "TargetCamera", + "title": "bevy_ui::ui_node::TargetCamera", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_ui::ui_node::UiImage": { "additionalProperties": false, "isComponent": true, @@ -8324,37 +10698,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_ui::ui_node::UiTextureAtlasImage": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "flip_x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "flip_y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "index": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "index", - "flip_x", - "flip_y" - ], - "short_name": "UiTextureAtlasImage", - "title": "bevy_ui::ui_node::UiTextureAtlasImage", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ui::ui_node::ZIndex": { "isComponent": true, "isResource": false, @@ -8491,31 +10834,40 @@ "type": "object", "typeInfo": "Value" }, + "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "short_name": "SmallVec<[Entity; 8]>", + "title": "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", + "type": "array", + "typeInfo": "List" + }, "bevy_window::cursor::CursorIcon": { "isComponent": false, "isResource": false, "oneOf": [ "Default", - "Crosshair", - "Hand", - "Arrow", - "Move", - "Text", - "Wait", - "Help", - "Progress", - "NotAllowed", "ContextMenu", + "Help", + "Pointer", + "Progress", + "Wait", "Cell", + "Crosshair", + "Text", "VerticalText", "Alias", "Copy", + "Move", "NoDrop", + "NotAllowed", "Grab", "Grabbing", - "AllScroll", - "ZoomIn", - "ZoomOut", "EResize", "NResize", "NeResize", @@ -8529,7 +10881,10 @@ "NeswResize", "NwseResize", "ColResize", - "RowResize" + "RowResize", + "AllScroll", + "ZoomIn", + "ZoomOut" ], "short_name": "CursorIcon", "title": "bevy_window::cursor::CursorIcon", @@ -8556,7 +10911,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8575,7 +10930,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8592,6 +10947,11 @@ "isComponent": false, "isResource": false, "properties": { + "delta": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "position": { "type": { "$ref": "#/$defs/glam::Vec2" @@ -8599,7 +10959,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8628,7 +10988,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8653,7 +11013,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8672,7 +11032,7 @@ "window": { "title": "window", "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8697,12 +11057,12 @@ "properties": { "char": { "type": { - "$ref": "#/$defs/char" + "$ref": "#/$defs/smol_str::SmolStr" } }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8738,7 +11098,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8758,7 +11118,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8777,7 +11137,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8796,7 +11156,7 @@ "properties": { "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8820,7 +11180,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8838,19 +11198,19 @@ "isComponent": false, "isResource": false, "properties": { - "entity": { - "type": { - "$ref": "#/$defs/bevy_ecs::Entity" - } - }, "position": { "type": { "$ref": "#/$defs/glam::IVec2" } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } } }, "required": [ - "entity", + "window", "position" ], "short_name": "WindowMoved", @@ -8858,6 +11218,31 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_window::event::WindowOccluded": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "properties": { + "occluded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "occluded" + ], + "short_name": "WindowOccluded", + "title": "bevy_window::event::WindowOccluded", + "type": "object", + "typeInfo": "Struct" + }, "bevy_window::event::WindowResized": { "additionalProperties": false, "isComponent": false, @@ -8875,7 +11260,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8901,7 +11286,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -8926,7 +11311,7 @@ }, "window": { "type": { - "$ref": "#/$defs/bevy_ecs::Entity" + "$ref": "#/$defs/bevy_ecs::entity::Entity" } } }, @@ -9149,11 +11534,6 @@ "$ref": "#/$defs/bevy_window::window::EnabledButtons" } }, - "fit_canvas_to_parent": { - "type": { - "$ref": "#/$defs/bool" - } - }, "focused": { "type": { "$ref": "#/$defs/bool" @@ -9179,6 +11559,11 @@ "$ref": "#/$defs/bevy_window::window::WindowMode" } }, + "name": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "position": { "type": { "$ref": "#/$defs/bevy_window::window::WindowPosition" @@ -9250,7 +11635,6 @@ "transparent", "focused", "window_level", - "fit_canvas_to_parent", "prevent_default_event_handling", "internal", "ime_enabled", @@ -9384,12 +11768,12 @@ }, "scale_factor": { "type": { - "$ref": "#/$defs/f64" + "$ref": "#/$defs/f32" } }, "scale_factor_override": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } } }, @@ -9439,6 +11823,14 @@ "type": "object", "typeInfo": "Value" }, + "core::ops::Range": { + "isComponent": false, + "isResource": false, + "short_name": "Range", + "title": "core::ops::Range", + "type": "object", + "typeInfo": "Value" + }, "core::option::Option": { "isComponent": false, "isResource": false, @@ -10649,19 +13041,6 @@ "type": "int", "typeInfo": "Value" }, - "smallvec::SmallVec<[bevy_ecs::Entity; 8]>": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/bevy_ecs::Entity" - } - }, - "short_name": "SmallVec<[Entity; 8]>", - "title": "smallvec::SmallVec<[bevy_ecs::Entity; 8]>", - "type": "array", - "typeInfo": "List" - }, "std::ffi::OsString": { "isComponent": false, "isResource": false, diff --git a/testing/bevy_example/assets/testing.blend b/testing/bevy_example/assets/testing.blend index 4b2fdbf..5af50a4 100644 Binary files a/testing/bevy_example/assets/testing.blend and b/testing/bevy_example/assets/testing.blend differ diff --git a/testing/bevy_example/expected_screenshot.png b/testing/bevy_example/expected_screenshot.png index f0e0e70..94da691 100644 Binary files a/testing/bevy_example/expected_screenshot.png and b/testing/bevy_example/expected_screenshot.png differ diff --git a/testing/bevy_example/src/core/mod.rs b/testing/bevy_example/src/core/mod.rs index 5421e4e..1ef7f3e 100644 --- a/testing/bevy_example/src/core/mod.rs +++ b/testing/bevy_example/src/core/mod.rs @@ -6,10 +6,7 @@ pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { app.add_plugins(( - ExportRegistryPlugin { - save_path: "assets/registry.json".into(), - ..Default::default() - }, + ExportRegistryPlugin::default(), BlueprintsPlugin { legacy_mode: false, library_folder: "models/library".into(), diff --git a/testing/bevy_example/src/game/in_game.rs b/testing/bevy_example/src/game/in_game.rs index 5a4a507..75be98a 100644 --- a/testing/bevy_example/src/game/in_game.rs +++ b/testing/bevy_example/src/game/in_game.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common::{assets::GameAssets, GameState, InAppRunning}; +use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; use bevy_rapier3d::prelude::Velocity; use rand::Rng; @@ -11,7 +11,6 @@ pub fn setup_game( models: Res>, mut next_game_state: ResMut>, ) { - println!("setting up all stuff"); commands.insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, @@ -41,12 +40,12 @@ pub fn setup_game( struct UnregisteredComponent; pub fn spawn_test( - keycode: Res>, + keycode: Res>, mut commands: Commands, mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::T) { + if keycode.just_pressed(KeyCode::KeyT) { let world = game_world.single_mut(); let world = world.1[0]; diff --git a/testing/bevy_example/src/game/mod.rs b/testing/bevy_example/src/game/mod.rs index 38145f0..99b9b3f 100644 --- a/testing/bevy_example/src/game/mod.rs +++ b/testing/bevy_example/src/game/mod.rs @@ -11,7 +11,7 @@ use bevy::{ prelude::*, render::view::screenshot::ScreenshotManager, time::common_conditions::on_timer, window::PrimaryWindow, }; -use bevy_gltf_worlflow_examples_common::{AppState, GameState}; +use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; use crate::{TupleTestF32, UnitTest}; diff --git a/testing/bevy_example/src/main.rs b/testing/bevy_example/src/main.rs index 8fca426..3c95987 100644 --- a/testing/bevy_example/src/main.rs +++ b/testing/bevy_example/src/main.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; -use bevy_editor_pls::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin; +use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; mod core; use crate::core::*; @@ -15,8 +14,6 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), - // editor - EditorPlugin::default(), // our custom plugins CommonPlugin, CorePlugin, // reusable plugins diff --git a/tools/bevy_components/__init__.py b/tools/bevy_components/__init__.py index 6088927..8f41247 100644 --- a/tools/bevy_components/__init__.py +++ b/tools/bevy_components/__init__.py @@ -1,7 +1,7 @@ bl_info = { "name": "bevy_components", "author": "kaosigh", - "version": (0, 3, 0), + "version": (0, 4, 0), "blender": (3, 4, 0), "location": "VIEW_3D", "description": "UI to help create Bevy blueprints and components", diff --git a/tools/bevy_components/propGroups/conversions_to_prop_group.py b/tools/bevy_components/propGroups/conversions_to_prop_group.py index d34c2a2..6eec325 100644 --- a/tools/bevy_components/propGroups/conversions_to_prop_group.py +++ b/tools/bevy_components/propGroups/conversions_to_prop_group.py @@ -164,7 +164,7 @@ type_mappings = { 'alloc::borrow::Cow': lambda value: str(value.replace('"', "")), 'bevy_render::color::Color': lambda value: parse_color(value, float, "Rgba"), - 'bevy_ecs::Entity': lambda value: int(value), + 'bevy_ecs::entity::Entity': lambda value: int(value), } def is_def_value_type(definition, registry): diff --git a/tools/bevy_components/registry/registry.py b/tools/bevy_components/registry/registry.py index abc1970..1299130 100644 --- a/tools/bevy_components/registry/registry.py +++ b/tools/bevy_components/registry/registry.py @@ -150,7 +150,7 @@ class ComponentsRegistry(PropertyGroup): "enum": dict(type=EnumProperty, presets=dict()), - 'bevy_ecs::Entity': {"type": IntProperty, "presets": {"min":0} }, + 'bevy_ecs::entity::Entity': {"type": IntProperty, "presets": {"min":0} }, 'bevy_utils::Uuid': dict(type=StringProperty, presets=dict()), } @@ -204,7 +204,7 @@ class ComponentsRegistry(PropertyGroup): "bevy_render::color::Color": [1.0, 1.0, 0.0, 1.0], - 'bevy_ecs::Entity': 0,#4294967295, # this is the same as Bevy's Entity::Placeholder, too big for Blender..sigh + 'bevy_ecs::entity::Entity': 0,#4294967295, # this is the same as Bevy's Entity::Placeholder, too big for Blender..sigh 'bevy_utils::Uuid': '"'+str(uuid.uuid4())+'"' } diff --git a/tools/bevy_components/tests/component_values_shuffler.py b/tools/bevy_components/tests/component_values_shuffler.py index 1de4f0d..567e1c3 100644 --- a/tools/bevy_components/tests/component_values_shuffler.py +++ b/tools/bevy_components/tests/component_values_shuffler.py @@ -65,7 +65,7 @@ type_mappings = { 'alloc::string::String': lambda : random_word(8), 'alloc::borrow::Cow': lambda : random_word(8), - 'bevy_ecs::Entity': lambda: 0, #4294967295, # + 'bevy_ecs::entity::Entity': lambda: 0, #4294967295, # 'bevy_utils::Uuid': lambda: '"'+str( uuid.UUID("73b3b118-7d01-4778-8bcc-4e79055f5d22") )+'"' } # @@ -199,6 +199,7 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi for i in range(0, number_of_list_items_to_add): new_entry = item_list.add() item_type_name = getattr(new_entry, "type_name") # we get the REAL type name + definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None if definition != None: @@ -207,7 +208,7 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi pass else: print("something else") - fieldValue = type_mappings[type_name]() + fieldValue = type_mappings[type_name]() if type_name in type_mappings else 'None' return fieldValue #return value diff --git a/tools/bevy_components/tests/expected_component_values.py b/tools/bevy_components/tests/expected_component_values.py index de5cedf..7babda6 100644 --- a/tools/bevy_components/tests/expected_component_values.py +++ b/tools/bevy_components/tests/expected_component_values.py @@ -3,12 +3,14 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()', 'Aabb': '(center: Vec3A(x:0.0, y:0.0, z:0.0), half_extents: Vec3A(x:0.0, y:0.0, z:0.0))', 'AdditionalMassProperties': 'Mass(0.0)', - 'AmbientLightSettings': '(brightness: 0.0, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', 'AnimationPlayer': '(animation: "", paused: true)', 'Animations': '(named_animations: "")', 'AutoAABBCollider': 'Cuboid', 'BackgroundColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', 'BasicTest': '(a: 0.0, b: 0, c: " ")', + 'BlenderBackgroundShader': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), strength: 0.0)', + 'BlenderLightShadows': '(buffer_bias: 0.0, enabled: true)', + 'BlenderShadowSettings': '(cascade_size: 0)', 'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.0, intensity: 0.0, low_frequency_boost: ' '0.0, low_frequency_boost_curvature: 0.0, prefilter_settings: (threshold: 0.0, threshold_softness: ' '0.0))', @@ -16,11 +18,12 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'BorderColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', 'Button': '()', 'CalculatedClip': '(clip: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)))', - 'Camera': '(hdr: true, is_active: true, msaa_writeback: true, order: 0, viewport: None)', - 'Camera2d': '(clear_color: Default)', - 'Camera3d': '(clear_color: Default, depth_load_op: Clear(0.0), depth_texture_usages: "", ' - 'screen_space_specular_transmission_quality: "", screen_space_specular_transmission_steps: 0)', - 'CameraRenderGraph': '(" ")', + 'Camera': '(clear_color: Default, hdr: true, is_active: true, msaa_writeback: true, order: 0, viewport: None)', + 'Camera2d': '()', + 'Camera3d': '(depth_load_op: Clear(0.0), depth_texture_usages: (0), screen_space_specular_transmission_quality: Low, ' + 'screen_space_specular_transmission_steps: 0)', + 'CameraMainTextureUsages': 'None', + 'CameraRenderGraph': 'None', 'CameraTrackable': '()', 'CameraTracking': '(offset: Vec3(x:0.0, y:0.0, z:0.0))', 'CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, z:0.0))', @@ -47,17 +50,20 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'Dominance': '(groups: 0)', 'EnumComplex': 'Float(0.0)', 'EnumTest': 'Metal', + 'Exposure': 'None', 'ExternalForce': '(force: Vec3(x:0.0, y:0.0, z:0.0), torque: Vec3(x:0.0, y:0.0, z:0.0))', 'ExternalImpulse': '(impulse: Vec3(x:0.0, y:0.0, z:0.0), torque_impulse: Vec3(x:0.0, y:0.0, z:0.0))', 'FocusPolicy': 'Block', 'FogSettings': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_color: Rgba(red:1.0, ' - 'green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, falloff: "")', + 'green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, falloff: Linear(end: 0.0, start: ' + '0.0))', 'Friction': '(coefficient: 0.0, combine_rule: "")', 'Frustum': '()', 'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', 'GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.0, y:0.0, z:0.0), y_axis: Vec3A(x:0.0, y:0.0, z:0.0), z_axis: ' 'Vec3A(x:0.0, y:0.0, z:0.0)), translation: Vec3A(x:0.0, y:0.0, z:0.0)))', 'GltfExtras': '(value: " ")', + 'GltfProcessed': '()', 'GravityScale': '(0.0)', 'Group': '(0)', 'Handle<()>': 'Strong("")', @@ -82,11 +88,13 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'Handle': 'Strong("")', 'Handle': 'Strong("")', 'Handle': 'Strong("")', - 'Handle': 'Strong("")', + 'Handle': 'Strong("")', 'Handle': 'Strong("")', + 'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.0, sides_scale_mode: ""))', 'InheritedVisibility': '(true)', 'Interaction': 'Pressed', 'Label': '()', + 'LightProbe': '()', 'LockedAxes': '(0)', 'MaterialInfo': '(name: " ", source: " ")', 'Mesh2dHandle': '(Strong(""))', @@ -112,6 +120,7 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'Parent': '(0)', 'PerspectiveProjection': '(aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0)', 'Pickable': '()', + 'PlaybackSettings': '(mode: Once, paused: true, spatial: true, spatial_scale: "", speed: 0.0, volume: (0.0))', 'Player': '()', 'PointLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), intensity: 0.0, radius: 0.0, range: 0.0, ' 'shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', @@ -126,10 +135,10 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', 'Sensor': '()', 'ShadowFilteringMethod': 'Hardware2x2', - 'ShadowmapSettings': '(size: 0)', 'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [])', 'Sleeping': '(angular_threshold: 0.0, linear_threshold: 0.0, sleeping: true)', 'SolverGroups': '(filters: (0), memberships: (0))', + 'SpatialListener': '(left_ear_offset: Vec3(x:0.0, y:0.0, z:0.0), right_ear_offset: Vec3(x:0.0, y:0.0, z:0.0))', 'SpawnHere': '()', 'SpotLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), inner_angle: 0.0, intensity: 0.0, outer_angle: ' '0.0, radius: 0.0, range: 0.0, shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', @@ -144,12 +153,10 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'Auto, left: Auto, right: Auto, top: Auto), max_height: Auto, max_width: Auto, min_height: Auto, min_width: ' 'Auto, overflow: (x: Visible, y: Visible), padding: (bottom: Auto, left: Auto, right: Auto, top: Auto), ' 'position_type: Relative, right: Auto, row_gap: Auto, top: Auto, width: Auto)', - 'Text': '(alignment: Left, linebreak_behavior: WordBoundary, sections: [])', + 'Text': '(justify: Left, linebreak_behavior: WordBoundary, sections: [])', 'Text2dBounds': '(size: Vec2(x:0.0, y:0.0))', 'TextFlags': '(needs_new_measure_func: true, needs_recompute: true)', 'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.0, y:0.0))', - 'TextureAtlasSprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: "", ' - 'flip_x: true, flip_y: true, index: 0)', 'Tonemapping': 'None', 'Transform': '(rotation: Quat(x:0.0, y:0.0, z:0.0, w:0.0), scale: Vec3(x:0.0, y:0.0, z:0.0), translation: Vec3(x:0.0, ' 'y:0.0, z:0.0))', @@ -163,10 +170,8 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'TupleVec2': '(Vec2(x:0.0, y:0.0))', 'TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))', 'TupleVecF32F32': '([])', - 'UiCameraConfig': '(show_ui: true)', 'UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))', 'UiImageSize': '(size: Vec2(x:0.0, y:0.0))', - 'UiTextureAtlasImage': '(flip_x: true, flip_y: true, index: 0)', 'UnitTest': '()', 'VecOfColors': '([])', 'VecOfF32s': '([])', @@ -177,13 +182,14 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot 'VisibleEntities': '()', 'Window': '(canvas: None, composite_alpha_mode: Auto, cursor: (grab_mode: None, hit_test: true, icon: Default, ' 'visible: true), decorations: true, enabled_buttons: (close: true, maximize: true, minimize: true), ' - 'fit_canvas_to_parent: true, focused: true, ime_enabled: true, ime_position: Vec2(x:0.0, y:0.0), internal: ' - '(maximize_request: None, minimize_request: None, physical_cursor_position: None), mode: Windowed, ' - 'position: Automatic, present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, ' - 'resize_constraints: (max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: 0.0), resolution: ' - '(physical_height: 0, physical_width: 0, scale_factor: 0.0, scale_factor_override: None), title: " ", ' - 'transparent: true, visible: true, window_level: AlwaysOnBottom, window_theme: "")', + 'focused: true, ime_enabled: true, ime_position: Vec2(x:0.0, y:0.0), internal: (maximize_request: None, ' + 'minimize_request: None, physical_cursor_position: None), mode: Windowed, name: None, position: Automatic, ' + 'present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, resize_constraints: ' + '(max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: 0.0), resolution: (physical_height: 0, ' + 'physical_width: 0, scale_factor: 0.0, scale_factor_override: None), title: " ", transparent: true, ' + 'visible: true, window_level: AlwaysOnBottom, window_theme: "")', 'Wireframe': '()', + 'WireframeColor': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', 'ZIndex': 'Local(0)'} @@ -193,14 +199,16 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Aabb': '(center: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), half_extents: ' 'Vec3A(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', 'AdditionalMassProperties': 'Mass(0.42888906598091125)', - 'AmbientLightSettings': '(brightness: 0.5714026093482971, color: Rgba(red:0.42888906598091125, ' - 'green:0.5780913233757019, blue:0.20609822869300842, alpha:0.8133212327957153))', 'AnimationPlayer': '(animation: "", paused: true)', 'Animations': '(named_animations: "")', 'AutoAABBCollider': 'Capsule', 'BackgroundColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' 'alpha:0.20609822869300842))', 'BasicTest': '(a: 0.5714026093482971, b: 54, c: "psagopiu")', + 'BlenderBackgroundShader': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' + 'alpha:0.20609822869300842), strength: 0.8133212327957153)', + 'BlenderLightShadows': '(buffer_bias: 0.5714026093482971, enabled: false)', + 'BlenderShadowSettings': '(cascade_size: 73)', 'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.42888906598091125, intensity: ' '0.5780913233757019, low_frequency_boost: 0.20609822869300842, low_frequency_boost_curvature: ' '0.8133212327957153, prefilter_settings: (threshold: 0.8235888481140137, threshold_softness: ' @@ -211,11 +219,12 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Button': '()', 'CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: Vec2(x:0.5780913233757019, ' 'y:0.20609822869300842)))', - 'Camera': '(hdr: true, is_active: false, msaa_writeback: false, order: 61, viewport: None)', - 'Camera2d': '(clear_color: None)', - 'Camera3d': '(clear_color: None, depth_load_op: Clear(0.42888906598091125), depth_texture_usages: "", ' - 'screen_space_specular_transmission_quality: "", screen_space_specular_transmission_steps: 73)', - 'CameraRenderGraph': '("sbnpsago")', + 'Camera': '(clear_color: None, hdr: false, is_active: false, msaa_writeback: false, order: 73, viewport: None)', + 'Camera2d': '()', + 'Camera3d': '(depth_load_op: Clear(0.42888906598091125), depth_texture_usages: (73), ' + 'screen_space_specular_transmission_quality: Low, screen_space_specular_transmission_steps: 26)', + 'CameraMainTextureUsages': 'None', + 'CameraRenderGraph': 'None', 'CameraTrackable': '()', 'CameraTracking': '(offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', 'CameraTrackingOffset': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', @@ -245,6 +254,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Dominance': '(groups: 73)', 'EnumComplex': 'StructLike(a: 0.03258506581187248, b: 61, c: "sagopiuz")', 'EnumTest': 'Squishy', + 'Exposure': 'None', 'ExternalForce': '(force: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), torque: ' 'Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', 'ExternalImpulse': '(impulse: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' @@ -253,7 +263,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'FogSettings': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' 'alpha:0.20609822869300842), directional_light_color: Rgba(red:0.8133212327957153, ' 'green:0.8235888481140137, blue:0.6534725427627563, alpha:0.16022956371307373), ' - 'directional_light_exponent: 0.5206693410873413, falloff: "")', + 'directional_light_exponent: 0.5206693410873413, falloff: ExponentialSquared(density: ' + '0.07608934491872787))', 'Friction': '(coefficient: 0.5714026093482971, combine_rule: "")', 'Frustum': '()', 'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', @@ -262,6 +273,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Vec3A(x:0.6534725427627563, y:0.16022956371307373, z:0.5206693410873413)), translation: ' 'Vec3A(x:0.3277728259563446, y:0.24999667704105377, z:0.952816903591156)))', 'GltfExtras': '(value: "sbnpsago")', + 'GltfProcessed': '()', 'GravityScale': '(0.5714026093482971)', 'Group': '(73)', 'Handle<()>': 'Strong("")', @@ -286,11 +298,14 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Handle': 'Strong("")', 'Handle': 'Strong("")', 'Handle': 'Strong("")', - 'Handle': 'Strong("")', + 'Handle': 'Strong("")', 'Handle': 'Strong("")', + 'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.42888906598091125, ' + 'sides_scale_mode: ""))', 'InheritedVisibility': '(true)', 'Interaction': 'None', 'Label': '()', + 'LightProbe': '()', 'LockedAxes': '(73)', 'MaterialInfo': '(name: "sbnpsago", source: "piuzfbqp")', 'Mesh2dHandle': '(Strong(""))', @@ -330,6 +345,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'PerspectiveProjection': '(aspect_ratio: 0.5714026093482971, far: 0.42888906598091125, fov: 0.5780913233757019, near: ' '0.20609822869300842)', 'Pickable': '()', + 'PlaybackSettings': '(mode: Once, paused: false, spatial: false, spatial_scale: "", speed: 0.5780913233757019, ' + 'volume: (0.20609822869300842))', 'Player': '()', 'PointLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' 'alpha:0.20609822869300842), intensity: 0.8133212327957153, radius: 0.8235888481140137, range: ' @@ -347,10 +364,11 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', 'Sensor': '()', 'ShadowFilteringMethod': 'Jimenez14', - 'ShadowmapSettings': '(size: 73)', 'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [0, 0])', 'Sleeping': '(angular_threshold: 0.5714026093482971, linear_threshold: 0.42888906598091125, sleeping: true)', 'SolverGroups': '(filters: (73), memberships: (4))', + 'SpatialListener': '(left_ear_offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' + 'right_ear_offset: Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', 'SpawnHere': '()', 'SpotLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' 'alpha:0.20609822869300842), inner_angle: 0.8133212327957153, intensity: 0.8235888481140137, ' @@ -373,7 +391,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'overflow: (x: Clip, y: Clip), padding: (bottom: Vw(0.06499417871236801), left: Vh(0.32468828558921814), ' 'right: Vh(0.15641891956329346), top: Px(0.9697836637496948)), position_type: Relative, right: Auto, ' 'row_gap: Auto, top: Vw(0.3011642396450043), width: Vh(0.6578909158706665))', - 'Text': '(alignment: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: Rgba(red:0.4825616776943207, ' + 'Text': '(justify: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: Rgba(red:0.4825616776943207, ' 'green:0.014832446351647377, blue:0.46258050203323364, alpha:0.4912964105606079), font: Weak(Index(index: ' '"")), font_size: 0.03440357372164726), value: "pkchxlbn"), (style: (color: Rgba(red:0.8601610660552979, ' 'green:0.6031906008720398, blue:0.38160598278045654, alpha:0.2836182117462158), font: Weak(Uuid(uuid: ' @@ -381,9 +399,6 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'Text2dBounds': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', 'TextFlags': '(needs_new_measure_func: true, needs_recompute: false)', 'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'TextureAtlasSprite': '(anchor: Custom(Vec2(x:0.03258506581187248, y:0.4825616776943207)), color: ' - 'Rgba(red:0.014832446351647377, green:0.46258050203323364, blue:0.4912964105606079, ' - 'alpha:0.27752065658569336), custom_size: "", flip_x: true, flip_y: false, index: 4)', 'Tonemapping': 'None', 'Transform': '(rotation: Quat(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019, ' 'w:0.20609822869300842), scale: Vec3(x:0.8133212327957153, y:0.8235888481140137, z:0.6534725427627563), ' @@ -399,10 +414,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))', 'TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', 'TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])', - 'UiCameraConfig': '(show_ui: true)', 'UiImage': '(flip_x: true, flip_y: false, texture: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")))', 'UiImageSize': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'UiTextureAtlasImage': '(flip_x: true, flip_y: false, index: 54)', 'UnitTest': '()', 'VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, blue:0.20609822869300842, ' 'alpha:0.8133212327957153)])', @@ -415,15 +428,15 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate 'VisibleEntities': '()', 'Window': '(canvas: None, composite_alpha_mode: PostMultiplied, cursor: (grab_mode: Confined, hit_test: true, icon: ' 'Default, visible: false), decorations: false, enabled_buttons: (close: true, maximize: false, minimize: ' - 'true), fit_canvas_to_parent: false, focused: true, ime_enabled: true, ime_position: ' - 'Vec2(x:0.16022956371307373, y:0.5206693410873413), internal: (maximize_request: Some(false), ' - 'minimize_request: None, physical_cursor_position: Some(DVec2(x:0.0445563830435276, ' - 'y:0.8601610660552979))), mode: SizedFullscreen, position: Centered(Primary), present_mode: Fifo, ' - 'prevent_default_event_handling: true, resizable: true, resize_constraints: (max_height: ' - '0.2623211145401001, max_width: 0.17467059195041656, min_height: 0.30310511589050293, min_width: ' - '0.36258742213249207), resolution: (physical_height: 58, physical_width: 98, scale_factor: ' - '0.8600491285324097, scale_factor_override: None), title: "otmbsahe", transparent: false, visible: true, ' - 'window_level: Normal, window_theme: "")', + 'true), focused: false, ime_enabled: true, ime_position: Vec2(x:0.8106188178062439, y:0.03440357372164726), ' + 'internal: (maximize_request: Some(false), minimize_request: None, physical_cursor_position: None), mode: ' + 'SizedFullscreen, name: None, position: Centered(Current), present_mode: Immediate, ' + 'prevent_default_event_handling: false, resizable: false, resize_constraints: (max_height: ' + '0.42126399278640747, max_width: 0.8268482089042664, min_height: 0.2623211145401001, min_width: ' + '0.17467059195041656), resolution: (physical_height: 38, physical_width: 84, scale_factor: ' + '0.36258742213249207, scale_factor_override: Some(0.7678378224372864)), title: "hotmbsah", transparent: ' + 'false, visible: false, window_level: Normal, window_theme: "")', 'Wireframe': '()', + 'WireframeColor': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' + 'alpha:0.20609822869300842))', 'ZIndex': 'Local(54)'} - diff --git a/tools/bevy_components/tests/test_components.py b/tools/bevy_components/tests/test_components.py index ecda556..e30a9a0 100644 --- a/tools/bevy_components/tests/test_components.py +++ b/tools/bevy_components/tests/test_components.py @@ -48,12 +48,12 @@ def test_components_should_generate_correct_custom_properties(setup_data): except Exception as error: errors.append(error) - """pp = pprint.PrettyPrinter(depth=14, width=120) + '''pp = pprint.PrettyPrinter(depth=14, width=120) print("CUSTOM PROPERTY VALUES") - pp.pprint(custom_property_values)""" + pp.pprint(custom_property_values)''' assert len(errors) == 0 - assert len(added_components) == 152 + assert len(added_components) == 158 def test_components_should_generate_correct_custom_properties_with_randomized_values(setup_data): @@ -105,7 +105,7 @@ def test_components_should_generate_correct_custom_properties_with_randomized_va print("error_components", error_components) assert len(errors) == 0 - assert len(added_components) == 152 + assert len(added_components) == 158 def test_components_should_generate_correct_propertyGroup_values_from_custom_properties(setup_data): registry = bpy.context.window_manager.components_registry @@ -163,7 +163,7 @@ def test_components_should_generate_correct_propertyGroup_values_from_custom_pro for index, error in enumerate(errors): print("ERROR", error, failing_components[index]) assert len(errors) == 0 - assert len(added_components) == 152 + assert len(added_components) == 158 def test_remove_components(setup_data): diff --git a/tools/bevy_components/tests/test_shuffler.py b/tools/bevy_components/tests/test_shuffler.py index 078e561..20ade74 100644 --- a/tools/bevy_components/tests/test_shuffler.py +++ b/tools/bevy_components/tests/test_shuffler.py @@ -139,4 +139,22 @@ def test_shuffler(setup_data): print("propertyGroup", object[short_name]) # cheating / making things easier for us for complex types: we use the custom property value assert object[short_name] == '(inverse_bindposes: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")), joints: [0, 0])' + + + # And another complex component + short_name = "CameraRenderGraph" + component_type = registry.short_names_to_long_names[short_name] + add_component_operator(component_type=component_type) + + property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[component_type] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", object[short_name]) + # cheating / making things easier for us for complex types: we use the custom property value + assert object[short_name] == 'None' \ No newline at end of file diff --git a/tools/gltf_auto_export/__init__.py b/tools/gltf_auto_export/__init__.py index 4e2dcc4..54c00bb 100644 --- a/tools/gltf_auto_export/__init__.py +++ b/tools/gltf_auto_export/__init__.py @@ -1,7 +1,7 @@ bl_info = { "name": "gltf_auto_export", "author": "kaosigh", - "version": (0, 14, 0), + "version": (0, 15, 0), "blender": (3, 4, 0), "location": "File > Import-Export", "description": "glTF/glb auto-export", diff --git a/tools/gltf_auto_export/auto_export/auto_export.py b/tools/gltf_auto_export/auto_export/auto_export.py index a9cd0f4..45ffac9 100644 --- a/tools/gltf_auto_export/auto_export/auto_export.py +++ b/tools/gltf_auto_export/auto_export/auto_export.py @@ -15,6 +15,7 @@ from ..modules.bevy_scene_components import upsert_scene_components def auto_export(changes_per_scene, changed_export_parameters, addon_prefs): # have the export parameters (not auto export, just gltf export) have changed: if yes (for example switch from glb to gltf, compression or not, animations or not etc), we need to re-export everything print ("changed_export_parameters", changed_export_parameters) + try: file_path = bpy.data.filepath # Get the folder @@ -38,6 +39,10 @@ def auto_export(changes_per_scene, changed_export_parameters, addon_prefs): if export_scene_settings: # inject/ update scene components upsert_scene_components(bpy.context.scene, bpy.context.scene.world, main_scene_names) + #inject/ update light shadow information + for light in bpy.data.lights: + enabled = 'true' if light.use_shadow else 'false' + light['BlenderLightShadows'] = f"(enabled: {enabled}, buffer_bias: {light.shadow_buffer_bias})" # export if export_blueprints: diff --git a/tools/gltf_auto_export/modules/bevy_scene_components.py b/tools/gltf_auto_export/modules/bevy_scene_components.py index 0728bc3..382fc7c 100644 --- a/tools/gltf_auto_export/modules/bevy_scene_components.py +++ b/tools/gltf_auto_export/modules/bevy_scene_components.py @@ -17,9 +17,9 @@ def upsert_scene_components(scene, world, main_scene_names): lighting_components = make_empty('lighting_components_'+scene.name, [0,0,0], [0,0,0], [0,0,0], root_collection) if world is not None: - lighting_components['AmbientLightSettings'] = ambient_color_to_component(world) + lighting_components['BlenderBackgroundShader'] = ambient_color_to_component(world) - lighting_components['ShadowmapSettings'] = scene_shadows_to_component(scene) + lighting_components['BlenderShadowSettings'] = scene_shadows_to_component(scene) if scene.eevee.use_bloom: @@ -40,22 +40,22 @@ def ambient_color_to_component(world): color = world.node_tree.nodes['Background'].inputs[0].default_value strength = world.node_tree.nodes['Background'].inputs[1].default_value except Exception as ex: - print("failed to parse ambient color: Only backgroud is supported") + print("failed to parse ambient color: Only background is supported") if color is not None and strength is not None: - colorRgba = "Rgba(red: "+ str(color[0]) + ", green: "+ str(color[1]) + ", blue: " + str(color[2]) + ", alpha: "+ str(color[3]) + ")" # TODO: YIKES clean this up - component = "( color:"+ str(colorRgba) +", brightness:"+str(strength)+")" + colorRgba = f"Rgba(red: {color[0]}, green: {color[1]}, blue: {color[2]}, alpha: {color[3]})" + component = f"( color: {colorRgba}, strength: {strength})" return component return None def scene_shadows_to_component(scene): - cascade_resolution = scene.eevee.shadow_cascade_size - component = "(size: "+ cascade_resolution +")" + cascade_size = scene.eevee.shadow_cascade_size + component = f"(cascade_size: {cascade_size})" return component def scene_bloom_to_component(scene): - component = "BloomSettings(intensity: "+ str(scene.eevee.bloom_intensity) +")" + component = f"BloomSettings(intensity: {scene.eevee.bloom_intensity})" return component def scene_ao_to_component(scene): diff --git a/tools/gltf_auto_export/tests/test_bevy_integration.py b/tools/gltf_auto_export/tests/test_bevy_integration.py index 70ba140..afd5255 100644 --- a/tools/gltf_auto_export/tests/test_bevy_integration.py +++ b/tools/gltf_auto_export/tests/test_bevy_integration.py @@ -94,11 +94,11 @@ def test_export_complex(setup_data): assert os.path.exists(os.path.join(models_path, "library", "Blueprint7_hierarchy.glb")) == True # now run bevy - bla = "cargo run --features bevy/dynamic_linking" + command = "cargo run --features bevy/dynamic_linking" # assert getattr(propertyGroup, 'a') == 0.5714026093482971 FNULL = open(os.devnull, 'w') #use this if you want to suppress output to stdout from the subprocess filename = "my_file.dat" - args = bla + args = command #subprocess.call(args, stdout=FNULL, stderr=FNULL, shell=False, cwd=bevy_run_exec_path) return_code = subprocess.call(["cargo", "run", "--features", "bevy/dynamic_linking"], cwd=root_path) print("RETURN CODE OF BEVY APP", return_code) diff --git a/tools/internal_generate_example_gltf_files.py b/tools/internal_generate_example_gltf_files.py new file mode 100644 index 0000000..45631cb --- /dev/null +++ b/tools/internal_generate_example_gltf_files.py @@ -0,0 +1,45 @@ +import os +import bpy +import subprocess + +def test_generate_example_gltf_files(): + auto_export_operator = bpy.ops.export_scenes.auto_gltf + stored_settings = bpy.data.texts[".gltf_auto_export_settings"] + print("export settings", stored_settings.as_string()) + auto_export_operator( + direct_mode = True, + export_change_detection=False + ) + +if __name__ == "__main__": + examples = [ + '../examples/bevy_gltf_blueprints/basic', + """'../examples/bevy_gltf_blueprints/animation', + '../examples/bevy_gltf_blueprints/basic_xpbd_physics', + '../examples/bevy_gltf_blueprints/materials', + '../examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles',""" + ] + + for example_path in examples: + print("generating gltf files for ", example_path) + assets_path = os.path.join(example_path, "assets") + art_path = os.path.join(example_path, "art") + blend_files = [] + + if os.path.exists(assets_path): + for file in os.listdir(assets_path): + if file.endswith(".blend"): + print("file found !", file) + blend_files.append(os.path.join("assets", file)) + if os.path.exists(art_path): + for file in os.listdir(art_path): + if file.endswith(".blend"): + print("file found !", file) + blend_files.append(os.path.join("art", file)) + + + print("blend files", blend_files) + for blend_file in blend_files: + fake_test_path = os.path.abspath("./internal_generate_example_gltf_files.py") + command = "pytest -svv --blender-executable /home/ckaos/tools/blender/blender-4.0.2-linux-x64/blender --blender-template "+blend_file + " "+fake_test_path + return_code = subprocess.call(command.split(" "), cwd=example_path) diff --git a/tools/internal_generate_release_zips.py b/tools/internal_generate_release_zips.py new file mode 100644 index 0000000..b73bd71 --- /dev/null +++ b/tools/internal_generate_release_zips.py @@ -0,0 +1,28 @@ +import os +import zipfile + +ignore_list = ['.pytest_cache', '__pycache__'] + +def zipdir(path, ziph): + # ziph is zipfile handle + for root, dirs, files in os.walk(path): + # filter out invalid paths + root_path = os.path.normpath(root) + root_path = root_path.split(os.sep) + add_file = True + for sub_path in root_path: + if sub_path in ignore_list: + add_file = False + break + + if add_file: + for file in files: + ziph.write(os.path.join(root, file), + os.path.relpath(os.path.join(root, file), + os.path.join(path, '..'))) + +with zipfile.ZipFile("bevy_components.zip", mode="w") as archive: + zipdir('./bevy_components', archive) + +with zipfile.ZipFile("gltf_auto_export.zip", mode="w") as archive: + zipdir('./gltf_auto_export', archive) \ No newline at end of file