diff --git a/crates/blenvy/Cargo.toml b/crates/blenvy/Cargo.toml index 926282e..adb59db 100644 --- a/crates/blenvy/Cargo.toml +++ b/crates/blenvy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blenvy" -version = "0.0.1" +version = "0.1.0" authors = ["Mark 'kaosat-dev' Moissette"] description = "Allows you to define Bevy components direclty inside gltf files and instanciate the components on the Bevy side." homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" @@ -17,6 +17,8 @@ workspace = true bevy = { version = "0.14.0-rc.3", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } serde = "1.0.188" ron = "0.8.1" +serde_json = "1.0.108" + [dev-dependencies] bevy = { version = "0.14.0-rc.3", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/blenvy/LICENSE.md b/crates/blenvy/LICENSE.md new file mode 100644 index 0000000..ad21aac --- /dev/null +++ b/crates/blenvy/LICENSE.md @@ -0,0 +1,4 @@ +This crate is available under either: + +* The [MIT License](./LICENSE_MIT) +* The [Apache License, Version 2.0](./LICENSE_APACHE) \ No newline at end of file diff --git a/crates/blenvy/LICENSE_APACHE.md b/crates/blenvy/LICENSE_APACHE.md new file mode 100644 index 0000000..f748977 --- /dev/null +++ b/crates/blenvy/LICENSE_APACHE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2023] [Mark "kaosat-dev" Moissette] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/crates/blenvy/LICENSE_MIT.md b/crates/blenvy/LICENSE_MIT.md new file mode 100644 index 0000000..c7e0144 --- /dev/null +++ b/crates/blenvy/LICENSE_MIT.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Mark "kaosat-dev" Moissette + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/crates/blenvy/README.md b/crates/blenvy/README.md new file mode 100644 index 0000000..000f05b --- /dev/null +++ b/crates/blenvy/README.md @@ -0,0 +1,333 @@ +[![Crates.io](https://img.shields.io/crates/v/blenvy)](https://crates.io/crates/blenvy) +[![Docs](https://img.shields.io/docsrs/blenvy)](https://docs.rs/blenvy/latest/blenvy/) +[![License](https://img.shields.io/crates/l/blenvy)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/blenvy/License.md) +[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) + +# blenvy + +this crate adds the ability to define Blueprints/Prefabs for [Bevy](https://bevyengine.org/) inside gltf files and spawn them in Bevy. + +* Allows you to create lightweight levels, where all assets are different gltf files and loaded after the main level is loaded +* Allows you to spawn different entities from gtlf files at runtime in a clean manner, including simplified animation support ! + +A blueprint is a set of **overrideable** components + a hierarchy: ie + + * just a Gltf file with Gltf_extras specifying components + * a component called BlueprintName + +Particularly useful when using [Blender](https://www.blender.org/) as an editor for the [Bevy](https://bevyengine.org/) game engine, combined with the Blender add-on that do a lot of the work for you +- [blenvy](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/blenvy) + + +## Usage + +Here's a minimal usage example: + +```toml +# Cargo.toml +[dependencies] +bevy="0.14" +blenvy = { version = "0.1.0"} + +``` + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugins(BlenvyPlugin) + + .run(); +} + +// not shown here: any other setup that is not specific to blueprints + +fn spawn_blueprint( + mut commands: Commands, + keycode: Res>, +){ + if keycode.just_pressed(KeyCode::S) { + let new_entity = commands.spawn(( + BlueprintName("Health_Pickup".to_string()), // mandatory !! + SpawnHere, // mandatory !! + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), // VERY important !! + // any other component you want to insert + )); + } +} +``` + +## Installation + +Add the following to your `[dependencies]` section in `Cargo.toml`: + +```toml +blenvy = "0.1.0" +``` + +Or use `cargo add`: + +```toml +cargo add blenvy +``` + +## Setup + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugin(BlenvyPlugin) + + .run(); +} + +``` + +you may want to configure your "library"/"blueprints" settings: + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(( + BlenvyPlugin{ + aabbs: true, // defaults to false, enable this to automatically calculate aabb for the scene/blueprint + ..Default::default() + } + )) + .run(); +} + +``` + +## Spawning entities from blueprints + +You can spawn entities from blueprints like this: +```rust no_run +commands.spawn(( + BlueprintName("Health_Pickup".to_string()), // mandatory !! + SpawnHere, // mandatory !! + + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), // optional + // any other component you want to insert +)) + +``` + +Once spawning of the actual entity is done, the spawned Blueprint will be *gone/merged* with the contents of Blueprint ! + +> Important : +you can **add** or **override** components present inside your Blueprint when spawning the BluePrint itself: ie + +### Adding components not specified inside the blueprint + +you can just add any additional components you need when spawning : + +```rust no_run +commands.spawn(( + BlueprintName("Health_Pickup".to_string()), + SpawnHere, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + // from Rapier/bevy_xpbd: this means the entity will also have a velocity component when inserted into the world + Velocity { + linvel: Vec3::new(vel_x, vel_y, vel_z), + angvel: Vec3::new(0.0, 0.0, 0.0), + }, +)) + +``` +### Overriding components specified inside the blueprint + +any component you specify when spawning the Blueprint that is also specified **within** the Blueprint will **override** that component in the final spawned entity + +for example +```rust no_run +commands.spawn(( + BlueprintName("Health_Pickup".to_string()), + SpawnHere, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + HealthPowerUp(20)// if this is component is also present inside the "Health_Pickup" blueprint, that one will be replaced with this component during spawning +)) + +``` + +### BluePrintBundle + +There is also a ```BluePrintBundle``` for convenience , which just has + * a ```BlueprintName``` component + * a ```SpawnHere``` component + +## Additional information + +- When a blueprint is spawned, all its children entities (and nested children etc) also have an ```InBlueprint``` component that gets insert +- In cases where that is undesirable, you can add a ```NoInBlueprint``` component on the entity you spawn the blueprint with, and the components above will not be add +- if you want to overwrite the **path** where this crate looks for blueprints (gltf files) , you can add a ```Library``` component , and that will be used instead of the default path +ie : + +```rust no_run +commands + .spawn(( + Name::from("test"), + BluePrintBundle { + blueprint: BlueprintName("TestBlueprint".to_string()), + ..Default::default() + }, + Library("models".into()) // now the path to the blueprint above will be /assets/models/TestBlueprint.glb + )) +``` +- this crate also provides a special optional ```GameWorldTag``` component: this is useful when you want to keep all your spawned entities inside a root entity + +You can use it in your queries to add your entities as children of this "world" +This way all your levels, your dynamic entities etc, are kept seperated from UI nodes & other entities that are not relevant to the game world + +> Note: you should only have a SINGLE entity tagged with that component ! + +```rust no_run + commands.spawn(( + SceneBundle { + scene: models + .get(game_assets.world.id()) + .expect("main level should have been loaded") + .scenes[0] + .clone(), + ..default() + }, + bevy::prelude::Name::from("world"), + GameWorldTag, // here it is + )); +``` + + +## SystemSet + +the ordering of systems is very important ! + +For example to replace your proxy components (stand-in components when you cannot/ do not want to use real components in the gltf file) with actual ones, which should happen **AFTER** the Blueprint based spawning, + +so ```blenvy``` provides a **SystemSet** for that purpose: ```GltfBlueprintsSet``` + +Typically , the order of systems should be + +***bevy_gltf_components (GltfComponentsSet::Injection)*** => ***blenvy (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn)*** => ***replace_proxies*** + +see https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/basic for how to set it up correctly + + + +## Animation + +```blenvy``` provides some lightweight helpers to deal with animations stored in gltf files + + * an ```Animations``` component that gets inserted into spawned (root) entities that contains a hashmap of all animations contained inside that entity/gltf file . + (this is a copy of the ```named_animations``` inside Bevy's gltf structures ) + * an ```AnimationPlayerLink``` component that gets inserted into spawned (root) entities, to make it easier to trigger/ control animations than it usually is inside Bevy + Gltf files + +The workflow for animations is as follows: +* create a gltf file with animations (using Blender & co) as you would normally do +* inside Bevy, use the ```blenvy``` boilerplate (see sections above), no specific setup beyond that is required +* to control the animation of an entity, you need to query for entities that have both ```AnimationPlayerLink``` and ```Animations``` components (added by ```blenvy```) AND entities with the ```AnimationPlayer``` component + +For example: + +```rust no_run +// example of changing animation of entities based on proximity to the player, for "fox" entities (Tag component) +pub fn animation_change_on_proximity_foxes( + players: Query<&GlobalTransform, With>, + animated_foxes: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations ), With>, + + mut animation_players: Query<&mut AnimationPlayer>, + +){ + for player_transforms in players.iter() { + for (fox_tranforms, link, animations) in animated_foxes.iter() { + let distance = player_transforms + .translation() + .distance(fox_tranforms.translation()); + let mut anim_name = "Walk"; + if distance < 8.5 { + anim_name = "Run"; + } + else if distance >= 8.5 && distance < 10.0{ + anim_name = "Walk"; + } + else if distance >= 10.0 && distance < 15.0{ + anim_name = "Survey"; + } + // now play the animation based on the chosen animation name + let mut animation_player = animation_players.get_mut(link.0).unwrap(); + animation_player.play_with_transition( + animations.named_animations.get(anim_name).expect("animation name should be in the list").clone(), + Duration::from_secs(3) + ).repeat(); + } + } +} +``` + +see https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/animation for how to set it up correctly + +particularly from https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/animation/game/in_game.rs + + +## Materials + +You have the option of using "material libraries" to share common textures/materials between blueprints, in order to avoid asset & memory bloat: + +Ie for example without this option, 56 different blueprints using the same material with a large texture would lead to the material/texture being embeded +56 times !! + + +you can configure this with the settings: +```rust +material_library: true // defaults to false, enable this to enable automatic injection of materials from material library files +``` + +> Important! you must take care of preloading your material librairy gltf files in advance, using for example ```bevy_asset_loader```since +```blenvy``` currently does NOT take care of loading those at runtime + + +see https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/materials for how to set it up correctly + +Generating optimised blueprints and material libraries can be automated using the latests version of the [Blender plugin](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/gltf_auto_export) + + +## Examples + +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/basic + +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/basic_xpbd_physics + +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/animation + +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/materials + +https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/blenvy/multiple_levels_multiple_blendfiles + + +## Compatible Bevy versions + +The main branch is compatible with the latest Bevy release, while the branch `bevy_main` tries to track the `main` branch of Bevy (PRs updating the tracked commit are welcome). + +Compatibility of `blenvy` versions: +| `blenvy` | `bevy` | +| :-- | :-- | +| `0.1 - 0.2` | `0.14` | +| branch `main` | `0.14` | +| branch `bevy_main` | `main` | + + +## License + +This crate, all its code, contents & assets is Dual-licensed under either of + +- Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](./LICENSE_MIT.md) or https://opensource.org/licenses/MIT) \ No newline at end of file diff --git a/crates/blenvy/src/blueprints/aabb.rs b/crates/blenvy/src/blueprints/aabb.rs new file mode 100644 index 0000000..84c2204 --- /dev/null +++ b/crates/blenvy/src/blueprints/aabb.rs @@ -0,0 +1,61 @@ +use bevy::{math::Vec3A, prelude::*, render::primitives::Aabb}; + +use crate::{BlenvyConfig, Spawned}; + +/// helper system that computes the compound aabbs of the scenes/blueprints +pub fn compute_scene_aabbs( + root_entities: Query<(Entity, &Name), (With, Without)>, + children: Query<&Children>, + existing_aabbs: Query<&Aabb>, + + mut blenvy_config: ResMut, + mut commands: Commands, +) { + // compute compound aabb + for (root_entity, name) in root_entities.iter() { + // info!("generating aabb for {:?}", name); + + // only recompute aabb if it has not already been done before + if blenvy_config.aabb_cache.contains_key(&name.to_string()) { + let aabb = blenvy_config + .aabb_cache + .get(&name.to_string()) + .expect("we should have the aabb available"); + commands.entity(root_entity).insert(*aabb); + } else { + let aabb = compute_descendant_aabb(root_entity, &children, &existing_aabbs); + commands.entity(root_entity).insert(aabb); + blenvy_config.aabb_cache.insert(name.to_string(), aabb); + } + } +} + +pub fn compute_descendant_aabb( + root_entity: Entity, + children: &Query<&Children>, + existing_aabbs: &Query<&Aabb>, +) -> Aabb { + if let Ok(children_list) = children.get(root_entity) { + let mut chilren_aabbs: Vec = vec![]; + for child in children_list.iter() { + if let Ok(aabb) = existing_aabbs.get(*child) { + chilren_aabbs.push(*aabb); + } else { + let aabb = compute_descendant_aabb(*child, children, existing_aabbs); + chilren_aabbs.push(aabb); + } + } + + let mut min = Vec3A::splat(f32::MAX); + let mut max = Vec3A::splat(f32::MIN); + for aabb in chilren_aabbs.iter() { + min = min.min(aabb.min()); + max = max.max(aabb.max()); + } + let aabb = Aabb::from_min_max(Vec3::from(min), Vec3::from(max)); + + return aabb; + } + + Aabb::default() +} diff --git a/crates/blenvy/src/blueprints/animation.rs b/crates/blenvy/src/blueprints/animation.rs new file mode 100644 index 0000000..6a61a65 --- /dev/null +++ b/crates/blenvy/src/blueprints/animation.rs @@ -0,0 +1,221 @@ +use bevy::prelude::*; +use bevy::utils::HashMap; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// storage for animations for a given entity's BLUEPRINT (ie for example a characters animations), essentially a clone of gltf's `named_animations` +pub struct BlueprintAnimations { + pub named_animations: HashMap>, +} + +#[derive(Component, Debug)] +/// Stop gap helper component : this is inserted into a "root" entity (an entity representing a whole gltf file) +/// so that the root entity knows which of its children contains an actualy `AnimationPlayer` component +/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" +/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid +pub struct BlueprintAnimationPlayerLink(pub Entity); + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// storage for scene level animations for a given entity (hierarchy), essentially a clone of gltf's `named_animations` +pub struct SceneAnimations { + pub named_animations: HashMap>, +} + +#[derive(Component, Debug)] +/// Stop gap helper component : this is inserted into a "root" entity (an entity representing a whole gltf file) +/// so that the root entity knows which of its children contains an actualy `AnimationPlayer` component +/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" +/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid +pub struct SceneAnimationPlayerLink(pub Entity); + +/// Stores Animation information: name, frame informations etc +#[derive(Reflect, Default, Debug)] +pub struct AnimationInfo { + pub name: String, + pub frame_start: f32, + pub frame_end: f32, + pub frames_length: f32, + pub frame_start_override: f32, + pub frame_end_override: f32, +} + +/// Stores information about animations, to make things a bit easier api wise: +/// these components are automatically inserted by `gltf_auto_export` on entities that have animations +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct AnimationInfos { + pub animations: Vec, +} + +#[derive(Reflect, Default, Debug)] +pub struct AnimationMarker { + // pub frame: u32, + pub name: String, + pub handled_for_cycle: bool, +} + +/// Stores information about animation markers: practical for adding things like triggering events at specific keyframes etc +/// it is essentiall a hashmap of `AnimationName` => `HashMap`<`FrameNumber`, Vec of marker names> +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct AnimationMarkers(pub HashMap>>); + +/// Event that gets triggered once a specific marker inside an animation has been reached (frame based) +/// Provides some usefull information about which entity , wich animation, wich frame & which marker got triggered +#[derive(Event, Debug)] +pub struct AnimationMarkerReached { + pub entity: Entity, + pub animation_name: String, + pub frame: u32, + pub marker_name: String, +} + +///////////////////// + +/* +/// triggers events when a given animation marker is reached for INSTANCE animations +pub fn trigger_instance_animation_markers_events( + animation_infos: Query<( + Entity, + &AnimationMarkers, + &SceneAnimationPlayerLink, + &SceneAnimations, + &AnimationInfos, + )>, + animation_players: Query<(&AnimationPlayer)>, + animation_clips: Res>, + animation_graphs: Res>, + mut animation_marker_events: EventWriter, +) { + for (entity, markers, link, animations, animation_infos) in animation_infos.iter() { + let animation_player = animation_players.get(link.0).unwrap(); + let animation_clip = animation_clips.get(animation_player.animation_clip()); + // animation_player.play(animation) + + if animation_clip.is_some() { + // println!("Entity {:?} markers {:?}", entity, markers); + // println!("Player {:?} {}", animation_player.elapsed(), animation_player.completions()); + // FIMXE: yikes ! very inneficient ! perhaps add boilerplate to the "start playing animation" code so we know what is playing + let animation_name = animations.named_animations.iter().find_map(|(key, value)| { + if value == animation_player.animation_clip() { + Some(key) + } else { + None + } + }); + if animation_name.is_some() { + let animation_name = animation_name.unwrap(); + + let animation_length_seconds = animation_clip.unwrap().duration(); + let animation_length_frames = animation_infos + .animations + .iter() + .find(|anim| &anim.name == animation_name) + .unwrap() + .frames_length; + // TODO: we also need to take playback speed into account + let time_in_animation = animation_player.elapsed() + - (animation_player.completions() as f32) * animation_length_seconds; + let frame_seconds = + (animation_length_frames / animation_length_seconds) * time_in_animation; + let frame = frame_seconds as u32; + + let matching_animation_marker = &markers.0[animation_name]; + if matching_animation_marker.contains_key(&frame) { + let matching_markers_per_frame = matching_animation_marker.get(&frame).unwrap(); + + // let timediff = animation_length_seconds - time_in_animation; + // println!("timediff {}", timediff); + // println!("FOUND A MARKER {:?} at frame {}", matching_markers_per_frame, frame); + // emit an event AnimationMarkerReached(entity, animation_name, frame, marker_name) + // FIXME: problem, this can fire multiple times in a row, depending on animation length , speed , etc + for marker in matching_markers_per_frame { + animation_marker_events.send(AnimationMarkerReached { + entity, + animation_name: animation_name.clone(), + frame, + marker_name: marker.clone(), + }); + } + } + } + } + } +} + +/// triggers events when a given animation marker is reached for BLUEPRINT animations +pub fn trigger_blueprint_animation_markers_events( + animation_infos: Query<(Entity, &BlueprintAnimationPlayerLink, &BlueprintAnimations)>, + // FIXME: annoying hiearchy issue yet again: the Markers & AnimationInfos are stored INSIDE the blueprint, so we need to access them differently + all_animation_infos: Query<(Entity, &AnimationMarkers, &AnimationInfos, &Parent)>, + animation_players: Query<&AnimationPlayer>, + animation_clips: Res>, + mut animation_marker_events: EventWriter, +) { + for (entity, link, animations) in animation_infos.iter() { + let animation_player = animation_players.get(link.0).unwrap(); + let animation_clip = animation_clips.get(animation_player.animation_clip()); + + // FIXME: horrible code + for (_, markers, animation_infos, parent) in all_animation_infos.iter() { + if parent.get() == entity { + if animation_clip.is_some() { + // println!("Entity {:?} markers {:?}", entity, markers); + // println!("Player {:?} {}", animation_player.elapsed(), animation_player.completions()); + // FIMXE: yikes ! very inneficient ! perhaps add boilerplate to the "start playing animation" code so we know what is playing + let animation_name = + animations.named_animations.iter().find_map(|(key, value)| { + if value == animation_player.animation_clip() { + Some(key) + } else { + None + } + }); + if animation_name.is_some() { + let animation_name = animation_name.unwrap(); + let animation_length_seconds = animation_clip.unwrap().duration(); + let animation_length_frames = animation_infos + .animations + .iter() + .find(|anim| &anim.name == animation_name) + .unwrap() + .frames_length; + // TODO: we also need to take playback speed into account + let time_in_animation = animation_player.elapsed() + - (animation_player.completions() as f32) * animation_length_seconds; + let frame_seconds = (animation_length_frames / animation_length_seconds) + * time_in_animation; + // println!("frame seconds {}", frame_seconds); + let frame = frame_seconds.ceil() as u32; // FIXME , bad hack + + let matching_animation_marker = &markers.0[animation_name]; + + if matching_animation_marker.contains_key(&frame) { + let matching_markers_per_frame = + matching_animation_marker.get(&frame).unwrap(); + // println!("FOUND A MARKER {:?} at frame {}", matching_markers_per_frame, frame); + // emit an event AnimationMarkerReached(entity, animation_name, frame, marker_name) + // FIXME: complete hack-ish solution , otherwise this can fire multiple times in a row, depending on animation length , speed , etc + let diff = frame as f32 - frame_seconds; + println!("diff {}", diff); + if diff < 0.1 { + for marker in matching_markers_per_frame { + animation_marker_events.send(AnimationMarkerReached { + entity, + animation_name: animation_name.clone(), + frame, + marker_name: marker.clone(), + }); + } + } + } + } + } + + break; + } + } + } +} +*/ \ No newline at end of file diff --git a/crates/blenvy/src/blueprints/assets.rs b/crates/blenvy/src/blueprints/assets.rs new file mode 100644 index 0000000..02f3fe3 --- /dev/null +++ b/crates/blenvy/src/blueprints/assets.rs @@ -0,0 +1,63 @@ +use std::path::{Path, PathBuf}; + +use bevy::{asset::LoadedUntypedAsset, gltf::Gltf, prelude::*, utils::HashMap}; + +use crate::{BlenvyConfig, BlueprintAnimations}; + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct MyAsset{ + pub name: String, + pub path: String +} + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct LocalAssets(pub Vec); + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct AllAssets(pub Vec); + + + +//////////////////////// +/// +/// flag component, usually added when a blueprint is loaded +#[derive(Component)] +pub(crate) struct BlueprintAssetsLoaded; +/// flag component +#[derive(Component)] +pub(crate) struct BlueprintAssetsNotLoaded; + +/// helper component, for tracking loaded assets's loading state, id , handle etc +#[derive(Debug)] +pub(crate) struct AssetLoadTracker { + #[allow(dead_code)] + pub name: String, + pub id: AssetId, + pub loaded: bool, + #[allow(dead_code)] + pub handle: Handle, +} + + +/// helper component, for tracking loaded assets +#[derive(Component, Debug)] +pub(crate) struct AssetsToLoad { + pub all_loaded: bool, + pub asset_infos: Vec, + pub progress: f32, +} +impl Default for AssetsToLoad { + fn default() -> Self { + Self { + all_loaded: Default::default(), + asset_infos: Default::default(), + progress: Default::default(), + } + } +} diff --git a/crates/blenvy/src/blueprints/copy_components.rs b/crates/blenvy/src/blueprints/copy_components.rs new file mode 100644 index 0000000..b2a12b5 --- /dev/null +++ b/crates/blenvy/src/blueprints/copy_components.rs @@ -0,0 +1,107 @@ +use bevy::ecs::world::Command; +use bevy::prelude::*; +use std::any::TypeId; + +// originally based https://github.com/bevyengine/bevy/issues/1515, +// more specifically https://gist.github.com/nwtnni/85d6b87ae75337a522166c500c9a8418 +// to work with Bevy 0.11 +// to copy components between entities but NOT overwriting any existing components +// plus some bells & whistles +pub struct CopyComponents { + pub source: Entity, + pub destination: Entity, + pub exclude: Vec, + pub stringent: bool, +} + +impl CopyComponents { + // Copy all components from an entity to another. + // Using an entity with no components as the destination creates a copy of the source entity. + // Panics if: + // - the components are not registered in the type registry, + // - the world does not have a type registry + // - the source or destination entity do not exist + fn transfer_components(self, world: &mut World) { + let components = { + let registry = world + .get_resource::() + .expect("the world should have a type registry") + .read(); + + world + .get_entity(self.source) + .expect("source entity should exist") + .archetype() + .components() + .filter_map(|component_id| { + let component_info = world + .components() + .get_info(component_id) + .expect("component info should be available"); + + let type_id = component_info.type_id().unwrap(); + if self.exclude.contains(&type_id) { + debug!("excluding component: {:?}", component_info.name()); + None + } else { + debug!( + "cloning: component: {:?} {:?}", + component_info.name(), + type_id + ); + + if let Some(type_registration) = registry.get(type_id) { + Some(type_registration) + } else if self.stringent { + return Some(registry.get(type_id).unwrap_or_else(|| { + panic!( + "cannot clone entity: component: {:?} is not registered", + component_info.name() + ) + })); + } else { + warn!( + "cannot clone component: component: {:?} is not registered", + component_info.name() + ); + None + } + } + }) + .map(|type_id| { + return ( + type_id.data::().unwrap().clone(), + type_id.type_info().type_id(), // we need the original type_id down the line + ); + }) + .collect::>() + }; + + 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() + .clone_value(); + + let mut destination = world + .get_entity_mut(self.destination) + .expect("destination entity should exist"); + + // 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, &type_registry); + } + } + } +} + +// This allows the command to be used in systems +impl Command for CopyComponents { + fn apply(self, world: &mut World) { + self.transfer_components(world); + } +} diff --git a/crates/blenvy/src/blueprints/materials.rs b/crates/blenvy/src/blueprints/materials.rs new file mode 100644 index 0000000..a2a704a --- /dev/null +++ b/crates/blenvy/src/blueprints/materials.rs @@ -0,0 +1,189 @@ +use std::path::Path; + +use bevy::{ + asset::{AssetServer, Assets, Handle}, + ecs::{ + component::Component, + entity::Entity, + query::{Added, With}, + reflect::ReflectComponent, + system::{Commands, Query, Res, ResMut}, + }, + gltf::Gltf, + hierarchy::{Children, Parent}, + log::debug, + pbr::StandardMaterial, + reflect::Reflect, + render::mesh::Mesh, +}; + +use crate::{AssetLoadTracker, AssetsToLoad, BlenvyConfig, BlueprintInstanceReady}; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// struct containing the name & path of the material to apply +pub struct MaterialInfo { + pub name: String, + pub path: String, +} + +/// flag component +#[derive(Component)] +pub(crate) struct BlueprintMaterialAssetsLoaded; +/// flag component +#[derive(Component)] +pub(crate) struct BlueprintMaterialAssetsNotLoaded; + +/// system that injects / replaces materials from material library +pub(crate) fn materials_inject( + blenvy_config: ResMut, + material_infos: Query<(Entity, &MaterialInfo), Added>, + asset_server: Res, + mut commands: Commands, +) { + + + for (entity, material_info) in material_infos.iter() { + println!("Entity with material info {:?} {:?}", entity, material_info); + let material_full_path = format!("{}#{}", material_info.path, material_info.name); + if blenvy_config + .materials_cache + .contains_key(&material_full_path) + { + debug!("material is cached, retrieving"); + blenvy_config + .materials_cache + .get(&material_full_path) + .expect("we should have the material available"); + commands + .entity(entity) + .insert(BlueprintMaterialAssetsLoaded); + } else { + let material_file_handle = asset_server.load_untyped(&material_info.path.clone()); // : Handle + let material_file_id = material_file_handle.id(); + + let asset_infos: Vec = vec![AssetLoadTracker { + name: material_info.name.clone(), + id: material_file_id, + loaded: false, + handle: material_file_handle.clone(), + }]; + + commands + .entity(entity) + .insert(AssetsToLoad { + all_loaded: false, + asset_infos, + ..Default::default() + }) + .insert(BlueprintMaterialAssetsNotLoaded); + + } + } +} + +// TODO, merge with blueprints_check_assets_loading, make generic ? +pub(crate) fn check_for_material_loaded( + mut blueprint_assets_to_load: Query< + (Entity, &mut AssetsToLoad), + With, + >, + asset_server: Res, + mut commands: Commands, +) { + for (entity, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { + let mut all_loaded = true; + let mut loaded_amount = 0; + let total = assets_to_load.asset_infos.len(); + for tracker in assets_to_load.asset_infos.iter_mut() { + let asset_id = tracker.id; + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + tracker.loaded = loaded; + if loaded { + loaded_amount += 1; + } else { + all_loaded = false; + } + } + let progress: f32 = loaded_amount as f32 / total as f32; + assets_to_load.progress = progress; + + if all_loaded { + assets_to_load.all_loaded = true; + commands + .entity(entity) + .insert(BlueprintMaterialAssetsLoaded) + .remove::(); + } + } +} + +/// system that injects / replaces materials from material library +pub(crate) fn materials_inject2( + mut blenvy_config: ResMut, + material_infos: Query< + (&MaterialInfo, &Children), + ( + Added, + With, + ), + >, + with_materials_and_meshes: Query< + (), + ( + With, + With>, + With>, + ), + >, + assets_gltf: Res>, + asset_server: Res, + + mut commands: Commands, +) { + for (material_info, children) in material_infos.iter() { + let material_full_path = format!("{}#{}", material_info.path, material_info.name); + let mut material_found: Option<&Handle> = None; + + if blenvy_config + .materials_cache + .contains_key(&material_full_path) + { + debug!("material is cached, retrieving"); + let material = blenvy_config + .materials_cache + .get(&material_full_path) + .expect("we should have the material available"); + material_found = Some(material); + } else { + let model_handle: Handle = asset_server.load(material_info.path.clone()); // FIXME: kinda weird now + let mat_gltf = assets_gltf + .get(model_handle.id()) + .expect("material should have been preloaded"); + if mat_gltf.named_materials.contains_key(&material_info.name as &str) { + let material = mat_gltf + .named_materials + .get(&material_info.name as &str) + .expect("this material should have been loaded"); + blenvy_config + .materials_cache + .insert(material_full_path, material.clone()); + material_found = Some(material); + } + } + + if let Some(material) = material_found { + for child in children.iter() { + if with_materials_and_meshes.contains(*child) { + debug!( + "injecting material {}, path: {:?}", + material_info.name, + material_info.path.clone() + ); + + commands.entity(*child).insert(material.clone()); + } + } + } + } +} diff --git a/crates/blenvy/src/blueprints/mod.rs b/crates/blenvy/src/blueprints/mod.rs new file mode 100644 index 0000000..3a52047 --- /dev/null +++ b/crates/blenvy/src/blueprints/mod.rs @@ -0,0 +1,172 @@ +pub mod spawn_from_blueprints; +pub use spawn_from_blueprints::*; + +pub mod spawn_post_process; +pub(crate) use spawn_post_process::*; + +pub mod animation; +pub use animation::*; + +pub mod aabb; +pub use aabb::*; + +pub mod assets; +pub use assets::*; + +pub mod materials; +pub use materials::*; + +pub mod copy_components; +pub use copy_components::*; + +use core::fmt; +use std::path::PathBuf; + +use bevy::{prelude::*, render::primitives::Aabb, utils::HashMap}; + +use crate::{BlenvyConfig, GltfComponentsSet}; + +#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] +/// set for the two stages of blueprint based spawning : +pub enum GltfBlueprintsSet { + Spawn, + AfterSpawn, +} + +#[derive(Bundle)] +pub struct BluePrintBundle { + pub blueprint: BlueprintName, + pub blueprint_path: BlueprintPath, + pub spawn_here: SpawnHere, +} +impl Default for BluePrintBundle { + fn default() -> Self { + BluePrintBundle { + blueprint: BlueprintName("default".into()), + blueprint_path: BlueprintPath("".into()), + spawn_here: SpawnHere, + } + } +} + + +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default)] +pub enum GltfFormat { + #[default] + GLB, + GLTF, +} + +impl fmt::Display for GltfFormat { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + GltfFormat::GLB => { + write!(f, "glb",) + } + GltfFormat::GLTF => { + write!(f, "gltf") + } + } + } +} + +#[derive(Debug, Clone)] +/// Plugin for gltf blueprints +pub struct BlueprintsPlugin { + /// Automatically generate aabbs for the blueprints root objects + pub aabbs: bool, + /// + pub material_library: bool, +} + +impl Default for BlueprintsPlugin { + fn default() -> Self { + Self { + aabbs: false, + material_library: false + } + } +} + +fn aabbs_enabled(blenvy_config: Res) -> bool { + blenvy_config.aabbs +} + + +impl Plugin for BlueprintsPlugin { + fn build(&self, app: &mut App) { + app + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::>() + .register_type::() + .register_type::>>() + .register_type::>>>() + .add_event::() + .register_type::() + .register_type::>() + .register_type::>() + .register_type::() + .register_type::() + + .add_event::() + + + + .register_type::>>() + .configure_sets( + Update, + (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn) + .chain() + .after(GltfComponentsSet::Injection), + ) + .add_systems( + Update, + ( + blueprints_prepare_spawn, + blueprints_check_assets_loading, + blueprints_spawn, + + /*( + prepare_blueprints, + blueprints_check_assets_loading, + blueprints_spawn, + apply_deferred, + ) + .chain(),*/ + (compute_scene_aabbs, apply_deferred) + .chain() + .run_if(aabbs_enabled), + apply_deferred, + ( + materials_inject, + check_for_material_loaded, + materials_inject2, + ) + .chain() + ) + .chain() + .in_set(GltfBlueprintsSet::Spawn), + ) + .add_systems( + Update, + (spawned_blueprint_post_process, apply_deferred) + .chain() + .in_set(GltfBlueprintsSet::AfterSpawn), + ) + /* .add_systems( + Update, + ( + trigger_instance_animation_markers_events, + trigger_blueprint_animation_markers_events, + ), + )*/ + ; + } +} diff --git a/crates/blenvy/src/blueprints/old.rs b/crates/blenvy/src/blueprints/old.rs new file mode 100644 index 0000000..20724e5 --- /dev/null +++ b/crates/blenvy/src/blueprints/old.rs @@ -0,0 +1,248 @@ + + +/// helper component, for tracking loaded assets's loading state, id , handle etc +#[derive(Default, Debug)] +pub(crate) struct AssetLoadTracker { + #[allow(dead_code)] + pub name: String, + pub id: AssetId, + pub loaded: bool, + #[allow(dead_code)] + pub handle: Handle, +} + +/// helper component, for tracking loaded assets +#[derive(Component, Debug)] +pub(crate) struct AssetsToLoad { + pub all_loaded: bool, + pub asset_infos: Vec>, + pub progress: f32, +} +impl Default for AssetsToLoad { + fn default() -> Self { + Self { + all_loaded: Default::default(), + asset_infos: Default::default(), + progress: Default::default(), + } + } +} + +/// flag component, usually added when a blueprint is loaded +#[derive(Component)] +pub(crate) struct BlueprintAssetsLoaded; +/// flag component +#[derive(Component)] +pub(crate) struct BlueprintAssetsNotLoaded; + + + +/// spawning prepare function, +/// * also takes into account the already exisiting "override" components, ie "override components" > components from blueprint +pub(crate) fn prepare_blueprints( + spawn_placeholders: Query< + ( + Entity, + &BlueprintName, + Option<&Parent>, + Option<&Library>, + Option<&Name>, + Option<&BlueprintsList>, + ), + (Added, Added, Without), + >, + + mut commands: Commands, + asset_server: Res, + blenvy_config: Res, +) { + for (entity, blupeprint_name, original_parent, library_override, name, blueprints_list) in + spawn_placeholders.iter() + { + debug!( + "requesting to spawn {:?} for entity {:?}, id: {:?}, parent:{:?}", + blupeprint_name.0, name, entity, original_parent + ); + + // println!("main model path {:?}", model_path); + if blueprints_list.is_some() { + let blueprints_list = blueprints_list.unwrap(); + // println!("blueprints list {:?}", blueprints_list.0.keys()); + let mut asset_infos: Vec> = vec![]; + let library_path = + library_override.map_or_else(|| &blenvy_config.library_folder, |l| &l.0); + for (blueprint_name, _) in blueprints_list.0.iter() { + let model_file_name = format!("{}.{}", &blueprint_name, &blenvy_config.format); + let model_path = Path::new(&library_path).join(Path::new(model_file_name.as_str())); + + let model_handle: Handle = asset_server.load(model_path.clone()); + let model_id = model_handle.id(); + let loaded = asset_server.is_loaded_with_dependencies(model_id); + if !loaded { + asset_infos.push(AssetLoadTracker { + name: model_path.to_string_lossy().into(), + id: model_id, + loaded: false, + handle: model_handle.clone(), + }); + } + } + // if not all assets are already loaded, inject a component to signal that we need them to be loaded + if !asset_infos.is_empty() { + commands + .entity(entity) + .insert(AssetsToLoad { + all_loaded: false, + asset_infos, + ..Default::default() + }) + .insert(BlueprintAssetsNotLoaded); + } else { + commands.entity(entity).insert(BlueprintAssetsLoaded); + } + } else { + // in case there are no blueprintsList, we revert back to the old behaviour + commands.entity(entity).insert(BlueprintAssetsLoaded); + } + } +} + +pub(crate) fn blueprints_check_assets_loading( + mut blueprint_assets_to_load: Query< + (Entity, &mut AssetsToLoad), + With, + >, + asset_server: Res, + mut commands: Commands, +) { + for (entity, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { + let mut all_loaded = true; + let mut loaded_amount = 0; + let total = assets_to_load.asset_infos.len(); + for tracker in assets_to_load.asset_infos.iter_mut() { + let asset_id = tracker.id; + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + tracker.loaded = loaded; + if loaded { + loaded_amount += 1; + } else { + all_loaded = false; + } + } + let progress: f32 = loaded_amount as f32 / total as f32; + // println!("progress: {}",progress); + assets_to_load.progress = progress; + + if all_loaded { + assets_to_load.all_loaded = true; + commands + .entity(entity) + .insert(BlueprintAssetsLoaded) + .remove::(); + } + } +} + +pub(crate) fn blueprints_spawn( + spawn_placeholders: Query< + ( + Entity, + &BlueprintName, + Option<&Transform>, + Option<&Parent>, + Option<&Library>, + Option<&AddToGameWorld>, + Option<&Name>, + ), + ( + With, + Added, + Without, + ), + >, + + mut commands: Commands, + mut game_world: Query>, + + assets_gltf: Res>, + asset_server: Res, + blenvy_config: Res, + + children: Query<&Children>, +) { + for ( + entity, + blupeprint_name, + transform, + original_parent, + library_override, + add_to_world, + name, + ) in spawn_placeholders.iter() + { + debug!( + "attempting to spawn {:?} for entity {:?}, id: {:?}, parent:{:?}", + blupeprint_name.0, name, entity, original_parent + ); + + let what = &blupeprint_name.0; + let model_file_name = format!("{}.{}", &what, &blenvy_config.format); + + // library path is either defined at the plugin level or overriden by optional Library components + let library_path = + library_override.map_or_else(|| &blenvy_config.library_folder, |l| &l.0); + let model_path = Path::new(&library_path).join(Path::new(model_file_name.as_str())); + + // info!("attempting to spawn {:?}", model_path); + let model_handle: Handle = asset_server.load(model_path.clone()); // FIXME: kinda weird now + + let gltf = assets_gltf.get(&model_handle).unwrap_or_else(|| { + panic!( + "gltf file {:?} should have been loaded", + model_path.to_str() + ) + }); + + // WARNING we work under the assumtion that there is ONLY ONE named scene, and that the first one is the right one + let main_scene_name = gltf + .named_scenes + .keys() + .next() + .expect("there should be at least one named scene in the gltf file to spawn"); + + let scene = &gltf.named_scenes[main_scene_name]; + + // transforms are optional, but still deal with them correctly + let mut transforms: Transform = Transform::default(); + if transform.is_some() { + transforms = *transform.unwrap(); + } + + let mut original_children: Vec = vec![]; + if let Ok(c) = children.get(entity) { + for child in c.iter() { + original_children.push(*child); + } + } + commands.entity(entity).insert(( + SceneBundle { + scene: scene.clone(), + transform: transforms, + ..Default::default() + }, + Spawned, + OriginalChildren(original_children), + BlueprintAnimations { + // these are animations specific to the inside of the blueprint + named_animations: gltf.named_animations.clone(), + }, + )); + + if add_to_world.is_some() { + let world = game_world + .get_single_mut() + .expect("there should be a game world present"); + commands.entity(world).add_child(entity); + } + } +} diff --git a/crates/blenvy/src/blueprints/spawn_from_blueprints.rs b/crates/blenvy/src/blueprints/spawn_from_blueprints.rs new file mode 100644 index 0000000..5d84865 --- /dev/null +++ b/crates/blenvy/src/blueprints/spawn_from_blueprints.rs @@ -0,0 +1,365 @@ +use std::path::{Path, PathBuf}; + +use bevy::{gltf::Gltf, prelude::*, utils::hashbrown::HashMap}; + +use crate::{AllAssets, AssetsToLoad, AssetLoadTracker, BlenvyConfig, BlueprintAnimations, BlueprintAssetsLoaded, BlueprintAssetsNotLoaded}; + +/// this is a flag component for our levels/game world +#[derive(Component)] +pub struct GameWorldTag; + +/// Main component for the blueprints +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct BlueprintName(pub String); + +/// path component for the blueprints +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct BlueprintPath(pub String); + +/// flag component needed to signify the intent to spawn a Blueprint +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct SpawnHere; + +#[derive(Component)] +/// flag component for dynamically spawned scenes +pub struct Spawned; + + +#[derive(Component, Debug)] +/// flag component added when a Blueprint instance ist Ready : ie : +/// - its assets have loaded +/// - it has finished spawning +pub struct BlueprintInstanceReady; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component marking any spwaned child of blueprints ..unless the original entity was marked with the `NoInBlueprint` marker component +pub struct InBlueprint; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component preventing any spawned child of blueprints to be marked with the `InBlueprint` component +pub struct NoInBlueprint; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +// this allows overriding the default library path for a given entity/blueprint +pub struct Library(pub PathBuf); + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component to force adding newly spawned entity as child of game world +pub struct AddToGameWorld; + +#[derive(Component)] +/// helper component, just to transfer child data +pub(crate) struct OriginalChildren(pub Vec); + + +#[derive(Event, Debug)] +pub enum BlueprintEvent { + + /// event fired when a blueprint has finished loading its assets & before it attempts spawning + AssetsLoaded { + blueprint_name: String, + blueprint_path: String, + // TODO: add assets list ? + }, + /// event fired when a blueprint is COMPLETELY done spawning ie + /// - all its assets have been loaded + /// - the spawning attempt has been sucessfull + Spawned { + blueprint_name: String, + blueprint_path: String, + }, + + /// + Ready { + blueprint_path: String, + } + +} + +pub(crate) fn blueprints_prepare_spawn( + spawn_placeholders: Query< + ( + Entity, + &BlueprintPath, + ), + (Added, Without, Without)>, + + // before 0.14 we have to use a seperate query, after migrating we can query at the root level + entities_with_assets: Query< + ( + Entity, + /*&BlueprintName, + &BlueprintPath, + Option<&Parent>,*/ + Option<&Name>, + Option<&AllAssets>, + ), + (Added), // Added + >, + + + bla_bla : Query< + ( + Entity, + &BlueprintName, + &BlueprintPath, + Option<&Parent>, + Option<&AllAssets>, + ),(Added) + >, +mut commands: Commands, +asset_server: Res, + + +) { + for (entity, blueprint_path) in spawn_placeholders.iter() { + //println!("added blueprint_path {:?}", blueprint_path); + /*commands.entity(entity).insert( + SceneBundle { + scene: asset_server.load(format!("{}#Scene0", &blueprint_path.0)), // "levels/World.glb#Scene0"), + ..default() + }, + );*/ + // let model_handle: Handle = asset_server.load(model_path.clone()); + } + + for (entity, blueprint_name, blueprint_path, parent, all_assets) in bla_bla.iter() { + println!("added blueprint to spawn {:?} {:?}", blueprint_name, blueprint_path); + // println!("all assets {:?}", all_assets); + let untyped_handle = asset_server.load_untyped(&blueprint_path.0); + let asset_id = untyped_handle.id(); + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + + let mut asset_infos: Vec = vec![]; + if !loaded { + asset_infos.push(AssetLoadTracker { + name: blueprint_name.0.clone(), + id: asset_id, + loaded: false, + handle: untyped_handle.clone(), + }); + } + + // now insert load tracker + if !asset_infos.is_empty() { + commands + .entity(entity) + .insert(AssetsToLoad { + all_loaded: false, + asset_infos, + ..Default::default() + }) + .insert(BlueprintAssetsNotLoaded); + } else { + commands.entity(entity).insert(BlueprintAssetsLoaded); + } + } + + for (child_entity, child_entity_name, all_assets) in entities_with_assets.iter(){ + println!("added assets {:?} to {:?}", all_assets, child_entity_name); + if all_assets.is_some() { + let mut asset_infos: Vec = vec![]; + + for asset in all_assets.unwrap().0.iter() { + let untyped_handle = asset_server.load_untyped(&asset.path); + //println!("untyped handle {:?}", untyped_handle); + //asset_server.load(asset.path); + + let asset_id = untyped_handle.id(); + //println!("ID {:?}", asset_id); + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + //println!("Loaded ? {:?}", loaded); + if !loaded { + asset_infos.push(AssetLoadTracker { + name: asset.name.clone(), + id: asset_id, + loaded: false, + handle: untyped_handle.clone(), + }); + } + } + + // now insert load tracker + if !asset_infos.is_empty() { + commands + .entity(child_entity) + .insert(AssetsToLoad { + all_loaded: false, + asset_infos, + ..Default::default() + }) + .insert(BlueprintAssetsNotLoaded); + } else { + commands.entity(child_entity).insert(BlueprintAssetsLoaded); + } + } + } +} + +pub(crate) fn blueprints_check_assets_loading( + mut blueprint_assets_to_load: Query< + (Entity, Option<&Name>, &BlueprintPath, &mut AssetsToLoad), + With, + >, + asset_server: Res, + mut commands: Commands, + mut blueprint_events: EventWriter, + +) { + for (entity, entity_name, blueprint_path, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { + let mut all_loaded = true; + let mut loaded_amount = 0; + let total = assets_to_load.asset_infos.len(); + for tracker in assets_to_load.asset_infos.iter_mut() { + let asset_id = tracker.id; + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + println!("loading {}: // load state: {:?}", tracker.name, asset_server.load_state(asset_id)); + + // FIXME: hack for now + let mut failed = false;// asset_server.load_state(asset_id) == bevy::asset::LoadState::Failed(_error); + match asset_server.load_state(asset_id) { + bevy::asset::LoadState::Failed(_) => { + failed = true + }, + _ => {} + } + tracker.loaded = loaded || failed; + if loaded || failed { + loaded_amount += 1; + } else { + all_loaded = false; + } + } + let progress: f32 = loaded_amount as f32 / total as f32; + println!("progress: {}",progress); + assets_to_load.progress = progress; + + if all_loaded { + assets_to_load.all_loaded = true; + println!("done with loading {:?}, inserting components", entity_name); + blueprint_events.send(BlueprintEvent::AssetsLoaded {blueprint_name:"".into(), blueprint_path: blueprint_path.0.clone() }); + + commands + .entity(entity) + .insert(BlueprintAssetsLoaded) + .remove::() + .remove::() + ; + } + } +} + + + +pub(crate) fn blueprints_spawn( + spawn_placeholders: Query< + ( + Entity, + &BlueprintName, + &BlueprintPath, + Option<&Transform>, + Option<&Parent>, + Option<&AddToGameWorld>, + Option<&Name>, + ), + ( + With, + Added, + Without, + ), + >, + + mut commands: Commands, + mut game_world: Query>, + + assets_gltf: Res>, + asset_server: Res, + children: Query<&Children>, +) { + for ( + entity, + blupeprint_name, + blueprint_path, + transform, + original_parent, + add_to_world, + name, + ) in spawn_placeholders.iter() + { + info!( + "attempting to spawn blueprint {:?} for entity {:?}, id: {:?}, parent:{:?}", + blupeprint_name.0, name, entity, original_parent + ); + + // info!("attempting to spawn {:?}", model_path); + let model_handle: Handle = asset_server.load(blueprint_path.0.clone()); // FIXME: kinda weird now + + let gltf = assets_gltf.get(&model_handle).unwrap_or_else(|| { + panic!( + "gltf file {:?} should have been loaded", + &blueprint_path.0 + ) + }); + + // WARNING we work under the assumtion that there is ONLY ONE named scene, and that the first one is the right one + let main_scene_name = gltf + .named_scenes + .keys() + .next() + .expect("there should be at least one named scene in the gltf file to spawn"); + + let scene = &gltf.named_scenes[main_scene_name]; + + // transforms are optional, but still deal with them correctly + let mut transforms: Transform = Transform::default(); + if transform.is_some() { + transforms = *transform.unwrap(); + } + + let mut original_children: Vec = vec![]; + if let Ok(c) = children.get(entity) { + for child in c.iter() { + original_children.push(*child); + } + } + + let mut named_animations:HashMap> = HashMap::new() ; + for (key, value) in gltf.named_animations.iter() { + named_animations.insert(key.to_string(), value.clone()); + } + + commands.entity(entity).insert(( + SceneBundle { + scene: scene.clone(), + transform: transforms, + ..Default::default() + }, + Spawned, + BlueprintInstanceReady, // FIXME: not sure if this is should be added here or in the post process + OriginalChildren(original_children), + BlueprintAnimations { + // these are animations specific to the inside of the blueprint + named_animations: named_animations//gltf.named_animations.clone(), + }, + )); + + if add_to_world.is_some() { + let world = game_world + .get_single_mut() + .expect("there should be a game world present"); + commands.entity(world).add_child(entity); + } + } +} + + + + + diff --git a/crates/blenvy/src/blueprints/spawn_post_process.rs b/crates/blenvy/src/blueprints/spawn_post_process.rs new file mode 100644 index 0000000..ff25023 --- /dev/null +++ b/crates/blenvy/src/blueprints/spawn_post_process.rs @@ -0,0 +1,110 @@ +use std::any::TypeId; + +use bevy::gltf::Gltf; +use bevy::prelude::*; +use bevy::scene::SceneInstance; +// use bevy::utils::hashbrown::HashSet; + +use crate::{BlueprintAnimationPlayerLink, BlueprintAnimations, BlueprintPath}; +use crate::{SpawnHere, Spawned}; +use crate::{ + AssetsToLoad, BlueprintAssetsLoaded, BlueprintEvent, CopyComponents, InBlueprint, NoInBlueprint, OriginalChildren +}; + + + +/// this system is in charge of doing any necessary post processing after a blueprint scene has been spawned +/// - it removes one level of useless nesting +/// - it copies the blueprint's root components to the entity it was spawned on (original entity) +/// - it copies the children of the blueprint scene into the original entity +/// - it add `AnimationLink` components so that animations can be controlled from the original entity +/// - it cleans up/ removes a few , by then uneeded components +pub(crate) fn spawned_blueprint_post_process( + unprocessed_entities: Query< + ( + Entity, + &Children, + &OriginalChildren, + &BlueprintAnimations, + Option<&NoInBlueprint>, + Option<&Name>, + &BlueprintPath + ), + (With, With, With), + >, + added_animation_players: Query<(Entity, &Parent), Added>, + all_children: Query<&Children>, + + mut commands: Commands, + mut blueprint_events: EventWriter, + +) { + for (original, children, original_children, animations, no_inblueprint, name, blueprint_path) in + unprocessed_entities.iter() + { + info!("post processing blueprint for entity {:?}", name); + + if children.len() == 0 { + warn!("timing issue ! no children found, please restart your bevy app (bug being investigated)"); + continue; + } + // the root node is the first & normally only child inside a scene, it is the one that has all relevant components + let mut root_entity = Entity::PLACEHOLDER; //FIXME: and what about childless ones ?? => should not be possible normally + // let diff = HashSet::from_iter(original_children.0).difference(HashSet::from_iter(children)); + // we find the first child that was not in the entity before (aka added during the scene spawning) + for c in children.iter() { + if !original_children.0.contains(c) { + root_entity = *c; + break; + } + } + + // we flag all children of the blueprint instance with 'InBlueprint' + // can be usefull to filter out anything that came from blueprints vs normal children + if no_inblueprint.is_none() { + for child in all_children.iter_descendants(root_entity) { + commands.entity(child).insert(InBlueprint); + } + } + + // copy components into from blueprint instance's root_entity to original entity + commands.add(CopyComponents { + source: root_entity, + destination: original, + exclude: vec![TypeId::of::(), TypeId::of::()], + stringent: false, + }); + + // we move all of children of the blueprint instance one level to the original entity + if let Ok(root_entity_children) = all_children.get(root_entity) { + for child in root_entity_children.iter() { + // info!("copying child {:?} upward from {:?} to {:?}", names.get(*child), root_entity, original); + commands.entity(original).add_child(*child); + } + } + + if animations.named_animations.keys().len() > 0 { + for (added, parent) in added_animation_players.iter() { + if parent.get() == root_entity { + // FIXME: stopgap solution: since we cannot use an AnimationPlayer at the root entity level + // and we cannot update animation clips so that the EntityPaths point to one level deeper, + // BUT we still want to have some marker/control at the root entity level, we add this + commands + .entity(original) + .insert(BlueprintAnimationPlayerLink(added)); + } + } + } + + commands.entity(original).remove::(); + commands.entity(original).remove::(); + // commands.entity(original).remove::>(); // FIXME: if we delete the handle to the scene, things get despawned ! not what we want + //commands.entity(original).remove::(); // also clear the sub assets tracker to free up handles, perhaps just freeing up the handles and leave the rest would be better ? + //commands.entity(original).remove::(); + commands.entity(root_entity).despawn_recursive(); + + blueprint_events.send(BlueprintEvent::Spawned {blueprint_name:"".into(), blueprint_path: blueprint_path.0.clone() }); + + debug!("DONE WITH POST PROCESS"); + } +} diff --git a/crates/blenvy/src/blender_settings.rs b/crates/blenvy/src/components/blender_settings.rs similarity index 100% rename from crates/blenvy/src/blender_settings.rs rename to crates/blenvy/src/components/blender_settings.rs diff --git a/crates/blenvy/src/blender_settings/lighting.rs b/crates/blenvy/src/components/blender_settings/lighting.rs similarity index 100% rename from crates/blenvy/src/blender_settings/lighting.rs rename to crates/blenvy/src/components/blender_settings/lighting.rs diff --git a/crates/blenvy/src/components/mod.rs b/crates/blenvy/src/components/mod.rs new file mode 100644 index 0000000..e300b46 --- /dev/null +++ b/crates/blenvy/src/components/mod.rs @@ -0,0 +1,74 @@ +pub mod utils; +pub use utils::*; + +pub mod ronstring_to_reflect_component; +pub use ronstring_to_reflect_component::*; + +pub mod process_gltfs; +pub use process_gltfs::*; + +pub mod blender_settings; + +use bevy::{ + ecs::{component::Component, reflect::ReflectComponent, system::Resource}, + 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 +/// It will automatically run every time you load a gltf file +/// Add this plugin to your Bevy app to get access to this feature +/// ``` +/// # use bevy::prelude::*; +/// # use bevy::gltf::*; +/// # use bevy_gltf_components::ComponentsFromGltfPlugin; +/// +/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic for a real example +/// fn main() { +/// App::new() +/// .add_plugins(DefaultPlugins) +/// .add_plugin(ComponentsFromGltfPlugin) +/// .add_system(spawn_level) +/// .run(); +/// } +/// +/// fn spawn_level( +/// asset_server: Res, +/// mut commands: bevy::prelude::Commands, +/// keycode: Res>, + +/// ){ +/// if keycode.just_pressed(KeyCode::Return) { +/// commands.spawn(SceneBundle { +/// scene: asset_server.load("basic/models/level1.glb"), +/// transform: Transform::from_xyz(2.0, 0.0, -5.0), +/// ..Default::default() +/// }); +/// } +///} +/// ``` + +/// 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 { + Injection, +} + +#[derive(Default)] +pub struct ComponentsFromGltfPlugin {} + +impl Plugin for ComponentsFromGltfPlugin { + fn build(&self, app: &mut App) { + app.add_plugins(blender_settings::plugin) + .register_type::() + .add_systems( + Update, + (add_components_from_gltf_extras).in_set(GltfComponentsSet::Injection), + ); + } +} diff --git a/crates/blenvy/src/process_gltfs.rs b/crates/blenvy/src/components/process_gltfs.rs similarity index 62% rename from crates/blenvy/src/process_gltfs.rs rename to crates/blenvy/src/components/process_gltfs.rs index 1afb3d3..73bd6be 100644 --- a/crates/blenvy/src/process_gltfs.rs +++ b/crates/blenvy/src/components/process_gltfs.rs @@ -15,7 +15,8 @@ use bevy::{ use crate::{ronstring_to_reflect_component, GltfProcessed}; -fn bla_balb(entity: Entity, name: &Name, parent: &Parent, reflect_components: Vec<(Box, TypeRegistration)>, mut entity_components: HashMap, TypeRegistration)>>){ +// , mut entity_components: HashMap, TypeRegistration)>> +fn find_entity_components(entity: Entity, name: &Name, parent: &Parent, reflect_components: Vec<(Box, TypeRegistration)>, entity_components: &HashMap, TypeRegistration)>>) -> (Entity, Vec<(Box, TypeRegistration)>){ // we assign the components specified /xxx_components objects to their parent node let mut target_entity = entity; // if the node contains "components" or ends with "_pa" (ie add to parent), the components will not be added to the entity itself but to its parent @@ -39,9 +40,11 @@ fn bla_balb(entity: Entity, name: &Name, parent: &Parent, reflect_components: Ve for (component, type_registration) in reflect_components { updated_components.push((component.clone_value(), type_registration)); } - entity_components.insert(target_entity, updated_components); + return (target_entity, updated_components) + //entity_components.insert(target_entity, updated_components); } else { - entity_components.insert(target_entity, reflect_components); + return (target_entity, reflect_components); + // entity_components.insert(target_entity, reflect_components); } } @@ -69,38 +72,54 @@ pub fn add_components_from_gltf_extras(world: &mut World) { let type_registry = type_registry.read(); let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); - bla_balb(entity, name, parent, reflect_components, entity_components); - - /* - // we assign the components specified /xxx_components objects to their parent node - let mut target_entity = entity; - // if the node contains "components" or ends with "_pa" (ie add to parent), the components will not be added to the entity itself but to its parent - // this is mostly used for Blender collections - if name.as_str().contains("components") || name.as_str().ends_with("_pa") { - debug!("adding components to parent"); - target_entity = parent.get(); - } - debug!("adding to {:?}", target_entity); - - // if there where already components set to be added to this entity (for example when entity_data was refering to a parent), update the vec of entity_components accordingly - // this allows for example blender collection to provide basic ecs data & the instances to override/ define their own values - if entity_components.contains_key(&target_entity) { - let mut updated_components: Vec<(Box, TypeRegistration)> = Vec::new(); - let current_components = &entity_components[&target_entity]; - // first inject the current components - for (component, type_registration) in current_components { - updated_components.push((component.clone_value(), type_registration.clone())); - } - // then inject the new components: this also enables overwrite components set in the collection - for (component, type_registration) in reflect_components { - updated_components.push((component.clone_value(), type_registration)); - } - entity_components.insert(target_entity, updated_components); - } else { - entity_components.insert(target_entity, reflect_components); - } */ + let (target_entity, updated_components) = find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); } + + for (entity, name, extra, parent) in scene_extras.iter(world) { + debug!( + "Name: {}, entity {:?}, parent: {:?}, scene_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, name, extra, parent) in mesh_extras.iter(world) { + debug!( + "Name: {}, entity {:?}, parent: {:?}, mesh_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, name, extra, parent) in material_extras.iter(world) { + debug!( + "Name: {}, entity {:?}, parent: {:?}, material_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, components) in entity_components { let type_registry: &AppTypeRegistry = world.resource(); let type_registry = type_registry.clone(); diff --git a/crates/blenvy/src/ronstring_to_reflect_component.rs b/crates/blenvy/src/components/ronstring_to_reflect_component.rs similarity index 100% rename from crates/blenvy/src/ronstring_to_reflect_component.rs rename to crates/blenvy/src/components/ronstring_to_reflect_component.rs diff --git a/crates/blenvy/src/utils.rs b/crates/blenvy/src/components/utils.rs similarity index 100% rename from crates/blenvy/src/utils.rs rename to crates/blenvy/src/components/utils.rs diff --git a/crates/blenvy/src/lib.rs b/crates/blenvy/src/lib.rs index 79af3d7..fc062be 100644 --- a/crates/blenvy/src/lib.rs +++ b/crates/blenvy/src/lib.rs @@ -1,78 +1,71 @@ -pub mod utils; -pub use utils::*; +use std::path::PathBuf; +use bevy::{prelude::*, render::primitives::Aabb, utils::HashMap}; -pub mod ronstring_to_reflect_component; -pub use ronstring_to_reflect_component::*; +pub mod components; +pub use components::*; -pub mod process_gltfs; -pub use process_gltfs::*; +pub mod registry; +pub use registry::*; -pub mod blender_settings; - -use bevy::{ - ecs::{component::Component, reflect::ReflectComponent, system::Resource}, - 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 -/// It will automatically run every time you load a gltf file -/// Add this plugin to your Bevy app to get access to this feature -/// ``` -/// # use bevy::prelude::*; -/// # use bevy::gltf::*; -/// # use bevy_gltf_components::ComponentsFromGltfPlugin; -/// -/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic for a real example -/// fn main() { -/// App::new() -/// .add_plugins(DefaultPlugins) -/// .add_plugin(ComponentsFromGltfPlugin) -/// .add_system(spawn_level) -/// .run(); -/// } -/// -/// fn spawn_level( -/// asset_server: Res, -/// mut commands: bevy::prelude::Commands, -/// keycode: Res>, - -/// ){ -/// if keycode.just_pressed(KeyCode::Return) { -/// commands.spawn(SceneBundle { -/// scene: asset_server.load("basic/models/level1.glb"), -/// transform: Transform::from_xyz(2.0, 0.0, -5.0), -/// ..Default::default() -/// }); -/// } -///} -/// ``` - -/// 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 { - Injection, -} +pub mod blueprints; +pub use blueprints::*; #[derive(Clone, Resource)] -pub struct GltfComponentsConfig {} +pub struct BlenvyConfig { + // registry + pub(crate) registry_save_path: PathBuf, + pub(crate) registry_component_filter: SceneFilter, + #[allow(dead_code)] + pub(crate) registry_resource_filter: SceneFilter, -#[derive(Default)] -pub struct ComponentsFromGltfPlugin {} + // blueprints + pub(crate) aabbs: bool, + pub(crate) aabb_cache: HashMap, // cache for aabbs + pub(crate) materials_cache: HashMap>, // cache for materials +} -impl Plugin for ComponentsFromGltfPlugin { - fn build(&self, app: &mut App) { - app.add_plugins(blender_settings::plugin) - .register_type::() - .insert_resource(GltfComponentsConfig {}) - .add_systems( - Update, - (add_components_from_gltf_extras).in_set(GltfComponentsSet::Injection), - ); + +#[derive(Debug, Clone)] +/// Plugin for gltf blueprints +pub struct BlenvyPlugin { + pub registry_save_path: PathBuf, + + pub registry_component_filter: SceneFilter, + pub registry_resource_filter: SceneFilter, + + /// Automatically generate aabbs for the blueprints root objects + pub aabbs: bool, +} + +impl Default for BlenvyPlugin { + fn default() -> Self { + Self { + registry_save_path: PathBuf::from("registry.json"), // relative to assets folder + registry_component_filter: SceneFilter::default(), + registry_resource_filter: SceneFilter::default(), + aabbs: false, + } } } + +impl Plugin for BlenvyPlugin { + fn build(&self, app: &mut App) { + app.add_plugins(( + ComponentsFromGltfPlugin::default(), + ExportRegistryPlugin::default(), + BlueprintsPlugin::default() + )) + .insert_resource(BlenvyConfig { + registry_save_path: self.registry_save_path.clone(), + registry_component_filter: self.registry_component_filter.clone(), + registry_resource_filter: self.registry_resource_filter.clone(), + + aabbs: self.aabbs, + aabb_cache: HashMap::new(), + + materials_cache: HashMap::new(), + }) + ; + + } +} \ No newline at end of file diff --git a/crates/blenvy/src/registry/export_types.rs b/crates/blenvy/src/registry/export_types.rs new file mode 100644 index 0000000..eb0d833 --- /dev/null +++ b/crates/blenvy/src/registry/export_types.rs @@ -0,0 +1,273 @@ +use std::{fs::File, path::Path}; +use bevy::{log::info, prelude::{AppTypeRegistry, ReflectComponent, ReflectResource, World}, reflect::{TypeInfo, TypeRegistration, VariantInfo}}; +use serde_json::{json, Map, Value}; +use crate::{AssetRoot, BlenvyConfig}; + +pub fn export_types(world: &mut World) { + let config = world + .get_resource::() + .expect("ExportComponentsConfig should exist at this stage"); + + let asset_root = world.resource::(); + let registry_save_path = Path::join(&asset_root.0, &config.registry_save_path); + let writer = File::create(registry_save_path).expect("should have created schema file"); + + let components_to_filter_out = &config.registry_component_filter.clone(); + let resources_to_filter_out = &config.registry_resource_filter.clone(); + + let types = world.resource_mut::(); + let types = types.read(); + let schemas = types + .iter() + .filter(|type_info| { + let type_id = type_info.type_id(); + components_to_filter_out.is_allowed_by_id(type_id) + && resources_to_filter_out.is_allowed_by_id(type_id) + }) + .map(export_type) + .collect::>(); + + serde_json::to_writer_pretty( + writer, + &json!({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "long_name": "bevy component registry schema", + "$defs": schemas, + }), + ) + .expect("valid json"); + + info!("Done exporting registry schema") +} + +pub fn export_type(reg: &TypeRegistration) -> (String, Value) { + let t = reg.type_info(); + let binding = t.type_path_table(); + let short_name = binding.short_path(); + let mut schema = match t { + TypeInfo::Struct(info) => { + let properties = info + .iter() + .enumerate() + .map(|(idx, field)| { + ( + field.name().to_owned(), + add_min_max(json!({ "type": typ(field.type_path()) }), reg, idx, None), + ) + }) + .collect::>(); + + json!({ + "type": "object", + "typeInfo": "Struct", + "long_name": t.type_path(), + "properties": properties, + "additionalProperties": false, + "required": info + .iter() + .filter(|field| !field.type_path().starts_with("core::option::Option")) + .map(|field| field.name()) + .collect::>(), + }) + } + TypeInfo::Enum(info) => { + let simple = info + .iter() + .all(|variant| matches!(variant, VariantInfo::Unit(_))); + if simple { + json!({ + "type": "string", + "typeInfo": "Enum", + "long_name": t.type_path(), + "oneOf": info + .iter() + .map(|variant| match variant { + VariantInfo::Unit(v) => v.name(), + _ => unreachable!(), + }) + .collect::>(), + }) + } else { + let variants = info + .iter() + .enumerate() + .map(|(field_idx, variant)| match variant { + //let binding = t.type_path_table(); + //let short_name = binding.short_path(); + VariantInfo::Struct(v) => json!({ + "type": "object", + "typeInfo": "Struct", + "long_name": v.name(), + "short_name": v.name().split("::").last().unwrap_or(v.name()), + "properties": v + .iter() + .enumerate() + .map(|(variant_idx, field)| (field.name().to_owned(), add_min_max(json!({"type": typ(field.type_path()), "long_name": field.name()}), reg, field_idx, Some(variant_idx)))) + .collect::>(), + "additionalProperties": false, + "required": v + .iter() + .filter(|field| !field.type_path().starts_with("core::option::Option")) + .map(|field| field.name()) + .collect::>(), + }), + VariantInfo::Tuple(v) => json!({ + "type": "array", + "typeInfo": "Tuple", + "long_name": v.name(), + "short_name":v.name(), + "prefixItems": v + .iter() + .enumerate() + .map(|(variant_idx, field)| add_min_max(json!({"type": typ(field.type_path())}), reg, field_idx, Some(variant_idx))) + .collect::>(), + "items": false, + }), + VariantInfo::Unit(v) => json!({ + "long_name": v.name(), + }), + }) + .collect::>(); + + json!({ + "type": "object", + "typeInfo": "Enum", + "long_name": t.type_path(), + "oneOf": variants, + }) + } + } + TypeInfo::TupleStruct(info) => json!({ + "long_name": t.type_path(), + "type": "array", + "typeInfo": "TupleStruct", + "prefixItems": info + .iter() + .enumerate() + .map(|(idx, field)| add_min_max(json!({"type": typ(field.type_path())}), reg, idx, None)) + .collect::>(), + "items": false, + }), + TypeInfo::List(info) => { + json!({ + "long_name": t.type_path(), + "type": "array", + "typeInfo": "List", + "items": json!({"type": typ(info.item_type_path_table().path())}), + }) + } + TypeInfo::Array(info) => json!({ + "long_name": t.type_path(), + "type": "array", + "typeInfo": "Array", + "items": json!({"type": typ(info.item_type_path_table().path())}), + }), + TypeInfo::Map(info) => json!({ + "long_name": t.type_path(), + "type": "object", + "typeInfo": "Map", + "valueType": json!({"type": typ(info.value_type_path_table().path())}), + "keyType": json!({"type": typ(info.key_type_path_table().path())}), + }), + TypeInfo::Tuple(info) => json!({ + "long_name": t.type_path(), + "type": "array", + "typeInfo": "Tuple", + "prefixItems": info + .iter() + .enumerate() + .map(|(idx, field)| add_min_max(json!({"type": typ(field.type_path())}), reg, idx, None)) + .collect::>(), + "items": false, + }), + TypeInfo::Value(info) => json!({ + "long_name": t.type_path(), + "type": map_json_type(info.type_path()), + "typeInfo": "Value", + }), + }; + schema.as_object_mut().unwrap().insert( + "isComponent".to_owned(), + reg.data::().is_some().into(), + ); + schema.as_object_mut().unwrap().insert( + "isResource".to_owned(), + reg.data::().is_some().into(), + ); + + schema + .as_object_mut() + .unwrap() + .insert("short_name".to_owned(), short_name.into()); + + (t.type_path().to_owned(), schema) +} + +fn typ(t: &str) -> Value { + json!({ "$ref": format!("#/$defs/{t}") }) +} + +fn map_json_type(t: &str) -> Value { + match t { + "bool" => "boolean", + "u8" | "u16" | "u32" | "u64" | "u128" | "usize" => "uint", + "i8" | "i16" | "i32" | "i64" | "i128" | "isize" => "int", + "f32" | "f64" => "float", + "char" | "str" | "alloc::string::String" => "string", + _ => "object", + } + .into() +} + +fn add_min_max( + mut val: Value, + reg: &TypeRegistration, + field_index: usize, + variant_index: Option, +) -> Value { + #[cfg(feature = "support-inspector")] + fn get_min_max( + reg: &TypeRegistration, + field_index: usize, + variant_index: Option, + ) -> Option<(Option, Option)> { + use bevy_inspector_egui::inspector_options::{ + std_options::NumberOptions, ReflectInspectorOptions, Target, + }; + + reg.data::() + .and_then(|ReflectInspectorOptions(o)| { + o.get(if let Some(variant_index) = variant_index { + Target::VariantField { + variant_index, + field_index, + } + } else { + Target::Field(field_index) + }) + }) + .and_then(|o| o.downcast_ref::>()) + .map(|num| (num.min, num.max)) + } + + #[cfg(not(feature = "support-inspector"))] + fn get_min_max( + _reg: &TypeRegistration, + _field_index: usize, + _variant_index: Option, + ) -> Option<(Option, Option)> { + None + } + + let Some((min, max)) = get_min_max(reg, field_index, variant_index) else { + return val; + }; + let obj = val.as_object_mut().unwrap(); + if let Some(min) = min { + obj.insert("minimum".to_owned(), min.into()); + } + if let Some(max) = max { + obj.insert("maximum".to_owned(), max.into()); + } + val +} diff --git a/crates/blenvy/src/registry/mod.rs b/crates/blenvy/src/registry/mod.rs new file mode 100644 index 0000000..336baa9 --- /dev/null +++ b/crates/blenvy/src/registry/mod.rs @@ -0,0 +1,54 @@ +use std::path::PathBuf; + +pub mod export_types; +pub use export_types::*; + +use bevy::{ + app::Startup, asset::AssetPlugin, prelude::{App, Plugin, Resource}, scene::SceneFilter +}; + +pub struct ExportRegistryPlugin { + pub component_filter: SceneFilter, + pub resource_filter: SceneFilter, + pub save_path: PathBuf, +} + +impl Default for ExportRegistryPlugin { + fn default() -> Self { + Self { + component_filter: SceneFilter::default(), + resource_filter: SceneFilter::default(), + save_path: PathBuf::from("registry.json"), // relative to assets folder + } + } +} + +impl Plugin for ExportRegistryPlugin { + fn build(&self, app: &mut App) { + app.register_asset_root() + .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/testing/bevy_example/Cargo.toml b/testing/bevy_example/Cargo.toml index f3dad90..db71fce 100644 --- a/testing/bevy_example/Cargo.toml +++ b/testing/bevy_example/Cargo.toml @@ -6,8 +6,9 @@ license = "MIT OR Apache-2.0" [dependencies] bevy = { version = "0.14.0-rc.3", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints" } -bevy_registry_export = { path = "../../crates/bevy_registry_export" } +blenvy = { path = "../../crates/blenvy" } +# bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints" } +# bevy_registry_export = { path = "../../crates/bevy_registry_export" } # bevy_gltf_worlflow_examples_common_rapier = { path = "../../examples/common_rapier" } #bevy_gltf_worlflow_examples_common = { path = "../../examples/common" } diff --git a/testing/bevy_example/assets/registry.json b/testing/bevy_example/assets/registry.json index edcbed6..ef98897 100644 --- a/testing/bevy_example/assets/registry.json +++ b/testing/bevy_example/assets/registry.json @@ -1,5 +1,15 @@ { "$defs": { + "()": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "()", + "prefixItems": [], + "short_name": "()", + "type": "array", + "typeInfo": "Tuple" + }, "(f32, f32)": { "isComponent": false, "isResource": false, @@ -21,13 +31,26 @@ "type": "array", "typeInfo": "Tuple" }, - "alloc::borrow::Cow": { + "(u8, u8)": { "isComponent": false, "isResource": false, - "long_name": "alloc::borrow::Cow", - "short_name": "Cow", - "type": "object", - "typeInfo": "Value" + "items": false, + "long_name": "(u8, u8)", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u8" + } + }, + { + "type": { + "$ref": "#/$defs/u8" + } + } + ], + "short_name": "(u8, u8)", + "type": "array", + "typeInfo": "Tuple" }, "alloc::borrow::Cow": { "isComponent": false, @@ -84,6 +107,32 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_animation::transition::AnimationTransition" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, "alloc::vec::Vec": { "isComponent": false, "isResource": false, @@ -110,29 +159,42 @@ "type": "array", "typeInfo": "List" }, - "alloc::vec::Vec": { + "alloc::vec::Vec": { "isComponent": false, "isResource": false, "items": { "type": { - "$ref": "#/$defs/bevy_gltf_blueprints::animation::AnimationInfo" + "$ref": "#/$defs/bevy_math::rects::urect::URect" } }, - "long_name": "alloc::vec::Vec", - "short_name": "Vec", + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, - "alloc::vec::Vec": { + "alloc::vec::Vec": { "isComponent": false, "isResource": false, "items": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_pbr::light::Cascade" } }, - "long_name": "alloc::vec::Vec", - "short_name": "Vec", + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_text::glyph_brush::PositionedGlyph" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -149,6 +211,58 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::RepeatedGridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::animation::AnimationInfo" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::assets::MyAsset" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, "alloc::vec::Vec": { "isComponent": false, "isResource": false, @@ -188,6 +302,32 @@ "type": "array", "typeInfo": "List" }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u16" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, "bevy_animation::AnimationClip": { "additionalProperties": false, "isComponent": false, @@ -196,23 +336,17 @@ "properties": { "curves": { "type": { - "$ref": "#/$defs/alloc::vec::Vec>" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>" } }, "duration": { "type": { "$ref": "#/$defs/f32" } - }, - "paths": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" - } } }, "required": [ "curves", - "paths", "duration" ], "short_name": "AnimationClip", @@ -225,25 +359,66 @@ "isResource": false, "long_name": "bevy_animation::AnimationPlayer", "properties": { - "animation": { + "active_animations": { "type": { - "$ref": "#/$defs/bevy_animation::PlayingAnimation" + "$ref": "#/$defs/std::collections::BTreeMap" } }, - "paused": { + "blend_weights": { "type": { - "$ref": "#/$defs/bool" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" } } }, "required": [ - "paused", - "animation" + "active_animations", + "blend_weights" ], "short_name": "AnimationPlayer", "type": "object", "typeInfo": "Struct" }, + "bevy_animation::AnimationTarget": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_animation::AnimationTarget", + "properties": { + "id": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "player": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "id", + "player" + ], + "short_name": "AnimationTarget", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::AnimationTargetId": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_animation::AnimationTargetId", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + ], + "short_name": "AnimationTargetId", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_animation::Interpolation": { "isComponent": false, "isResource": false, @@ -354,6 +529,111 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_animation::graph::AnimationGraph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::graph::AnimationGraph", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/petgraph::graph::DiGraph" + } + }, + "root": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "required": [ + "graph", + "root" + ], + "short_name": "AnimationGraph", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransition": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransition", + "properties": { + "animation": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "current_weight": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "weight_decline_per_sec": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "current_weight", + "weight_decline_per_sec", + "animation" + ], + "short_name": "AnimationTransition", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransitions": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransitions", + "properties": { + "main_animation": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "transitions": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "transitions" + ], + "short_name": "AnimationTransitions", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_asset::assets::AssetIndex": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::assets::AssetIndex", + "properties": { + "generation": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "index": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "generation", + "index" + ], + "short_name": "AssetIndex", + "type": "object", + "typeInfo": "Struct" + }, "bevy_asset::handle::Handle<()>": { "isComponent": true, "isResource": false, @@ -430,6 +710,44 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, @@ -506,44 +824,6 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_asset::handle::Handle", - "oneOf": [ - { - "items": false, - "long_name": "Strong", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "Weak", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "type": "object", - "typeInfo": "Enum" - }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, @@ -886,44 +1166,6 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_asset::handle::Handle", - "oneOf": [ - { - "items": false, - "long_name": "Strong", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "Weak", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "type": "object", - "typeInfo": "Enum" - }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, @@ -1296,7 +1538,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1342,7 +1584,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1358,6 +1600,52 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, @@ -1388,7 +1676,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1434,7 +1722,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1450,52 +1738,6 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_asset::id::AssetId", - "oneOf": [ - { - "additionalProperties": false, - "long_name": "Index", - "properties": { - "index": { - "long_name": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "Uuid", - "properties": { - "uuid": { - "long_name": "uuid", - "type": { - "$ref": "#/$defs/bevy_utils::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "type": "object", - "typeInfo": "Enum" - }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, @@ -1526,7 +1768,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1572,7 +1814,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1618,7 +1860,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1664,7 +1906,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1710,7 +1952,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1756,7 +1998,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1802,7 +2044,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1848,7 +2090,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1894,7 +2136,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1910,52 +2152,6 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_asset::id::AssetId", - "oneOf": [ - { - "additionalProperties": false, - "long_name": "Index", - "properties": { - "index": { - "long_name": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "Uuid", - "properties": { - "uuid": { - "long_name": "uuid", - "type": { - "$ref": "#/$defs/bevy_utils::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "type": "object", - "typeInfo": "Enum" - }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, @@ -1986,7 +2182,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2032,7 +2228,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2078,7 +2274,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2124,7 +2320,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2170,7 +2366,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2216,7 +2412,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2262,7 +2458,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2308,7 +2504,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2354,7 +2550,7 @@ "uuid": { "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2370,11 +2566,11 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_asset::path::AssetPath<'static>": { + "bevy_asset::path::AssetPath": { "isComponent": false, "isResource": false, - "long_name": "bevy_asset::path::AssetPath<'static>", - "short_name": "AssetPath<'static>", + "long_name": "bevy_asset::path::AssetPath", + "short_name": "AssetPath", "type": "object", "typeInfo": "Value" }, @@ -2500,6 +2696,22 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_audio::audio::SpatialScale": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_audio::audio::SpatialScale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "SpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_audio::audio::Volume": { "isComponent": false, "isResource": false, @@ -2516,6 +2728,526 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_color::color::Color": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::color::Color", + "oneOf": [ + { + "items": false, + "long_name": "Srgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::srgba::Srgba" + } + } + ], + "short_name": "Srgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "LinearRgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + } + ], + "short_name": "LinearRgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsla", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsla::Hsla" + } + } + ], + "short_name": "Hsla", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsva", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsva::Hsva" + } + } + ], + "short_name": "Hsva", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hwba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hwba::Hwba" + } + } + ], + "short_name": "Hwba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Laba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::laba::Laba" + } + } + ], + "short_name": "Laba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Lcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::lcha::Lcha" + } + } + ], + "short_name": "Lcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklaba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklaba::Oklaba" + } + } + ], + "short_name": "Oklaba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklcha::Oklcha" + } + } + ], + "short_name": "Oklcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Xyza", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::xyza::Xyza" + } + } + ], + "short_name": "Xyza", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Color", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_color::hsla::Hsla": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsla::Hsla", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "lightness", + "alpha" + ], + "short_name": "Hsla", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hsva::Hsva": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsva::Hsva", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "value", + "alpha" + ], + "short_name": "Hsva", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hwba::Hwba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hwba::Hwba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blackness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "whiteness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "whiteness", + "blackness", + "alpha" + ], + "short_name": "Hwba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::laba::Laba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::laba::Laba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Laba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::lcha::Lcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::lcha::Lcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Lcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::linear_rgba::LinearRgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::linear_rgba::LinearRgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "LinearRgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklaba::Oklaba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklaba::Oklaba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Oklaba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklcha::Oklcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklcha::Oklcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Oklcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::srgba::Srgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::srgba::Srgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "Srgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::xyza::Xyza": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::xyza::Xyza", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z", + "alpha" + ], + "short_name": "Xyza", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core::name::Name": { "additionalProperties": false, "isComponent": true, @@ -2794,6 +3526,21 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::fxaa::Sensitivity": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Sensitivity", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra", + "Extreme" + ], + "short_name": "Sensitivity", + "type": "string", + "typeInfo": "Enum" + }, "bevy_core_pipeline::prepass::DeferredPrepass": { "additionalProperties": false, "isComponent": false, @@ -2838,6 +3585,39 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::smaa::SmaaPreset": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaPreset", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "SmaaPreset", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::smaa::SmaaSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaSettings", + "properties": { + "preset": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::smaa::SmaaPreset" + } + } + }, + "required": [ + "preset" + ], + "short_name": "SmaaSettings", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core_pipeline::tonemapping::DebandDither": { "isComponent": true, "isResource": false, @@ -2868,66 +3648,6 @@ "type": "string", "typeInfo": "Enum" }, - "bevy_ecs::component::ComponentId": { - "isComponent": false, - "isResource": false, - "items": false, - "long_name": "bevy_ecs::component::ComponentId", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/usize" - } - } - ], - "short_name": "ComponentId", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_ecs::component::ComponentTicks": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_ecs::component::ComponentTicks", - "properties": { - "added": { - "type": { - "$ref": "#/$defs/bevy_ecs::component::Tick" - } - }, - "changed": { - "type": { - "$ref": "#/$defs/bevy_ecs::component::Tick" - } - } - }, - "required": [ - "added", - "changed" - ], - "short_name": "ComponentTicks", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_ecs::component::Tick": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_ecs::component::Tick", - "properties": { - "tick": { - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "tick" - ], - "short_name": "Tick", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ecs::entity::Entity": { "isComponent": false, "isResource": false, @@ -2936,30 +3656,6 @@ "type": "object", "typeInfo": "Value" }, - "bevy_egui::EguiSettings": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_egui::EguiSettings", - "properties": { - "default_open_url_target": { - "type": { - "$ref": "#/$defs/core::option::Option" - } - }, - "scale_factor": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "scale_factor" - ], - "short_name": "EguiSettings", - "type": "object", - "typeInfo": "Struct" - }, "bevy_example::dupe_components::EnumTest": { "isComponent": true, "isResource": false, @@ -3062,6 +3758,69 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_example::test_components::ComponentWithFieldsOfIdenticalType": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::ComponentWithFieldsOfIdenticalType", + "properties": { + "first": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fourth": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "second": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "third": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "first", + "second", + "third", + "fourth" + ], + "short_name": "ComponentWithFieldsOfIdenticalType", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::ComponentWithFieldsOfIdenticalType2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_example::test_components::ComponentWithFieldsOfIdenticalType2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "ComponentWithFieldsOfIdenticalType2", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_example::test_components::EnumComplex": { "isComponent": true, "isResource": false, @@ -3176,7 +3935,7 @@ "properties": { "inner": { "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" } } }, @@ -3233,7 +3992,7 @@ "properties": { "inner": { "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" } } }, @@ -3252,7 +4011,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" } } ], @@ -3435,7 +4194,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], @@ -3574,7 +4333,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } ], @@ -3598,6 +4357,22 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_example::test_components::VecOfUints": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_example::test_components::VecOfUints", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "VecOfUints", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_example::test_components::VecOfVec3s2": { "isComponent": true, "isResource": false, @@ -3622,7 +4397,7 @@ "properties": { "default_color": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } }, "draw_all": { @@ -3654,11 +4429,21 @@ "$ref": "#/$defs/bool" } }, + "line_joints": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineJoint" + } + }, "line_perspective": { "type": { "$ref": "#/$defs/bool" } }, + "line_style": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineStyle" + } + }, "line_width": { "type": { "$ref": "#/$defs/f32" @@ -3674,13 +4459,147 @@ "enabled", "line_width", "line_perspective", + "line_style", "depth_bias", - "render_layers" + "render_layers", + "line_joints" ], "short_name": "GizmoConfig", "type": "object", "typeInfo": "Struct" }, + "bevy_gizmos::config::GizmoConfigStore": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_gizmos::config::GizmoConfigStore", + "properties": {}, + "required": [], + "short_name": "GizmoConfigStore", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoLineJoint": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineJoint", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Miter" + }, + { + "items": false, + "long_name": "Round", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Round", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Bevel" + } + ], + "short_name": "GizmoLineJoint", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::config::GizmoLineStyle": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineStyle", + "oneOf": [ + "Solid", + "Dotted" + ], + "short_name": "GizmoLineStyle", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoColor": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoColor", + "oneOf": [ + { + "items": false, + "long_name": "Manual", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Manual", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Varied" + }, + { + "long_name": "MatchLightColor" + }, + { + "long_name": "ByLightType" + } + ], + "short_name": "LightGizmoColor", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoConfigGroup", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_gizmos::light::LightGizmoColor" + } + }, + "directional_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "point_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "spot_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "draw_all", + "color", + "point_light_color", + "spot_light_color", + "directional_light_color" + ], + "short_name": "LightGizmoConfigGroup", + "type": "object", + "typeInfo": "Struct" + }, "bevy_gltf::GltfExtras": { "additionalProperties": false, "isComponent": true, @@ -3700,433 +4619,63 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::animation::AnimationInfo": { + "bevy_gltf::GltfMaterialExtras": { "additionalProperties": false, - "isComponent": false, + "isComponent": true, "isResource": false, - "long_name": "bevy_gltf_blueprints::animation::AnimationInfo", + "long_name": "bevy_gltf::GltfMaterialExtras", "properties": { - "frame_end": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "frame_end_override": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "frame_start": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "frame_start_override": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "frames_length": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "name": { + "value": { "type": { "$ref": "#/$defs/alloc::string::String" } } }, "required": [ - "name", - "frame_start", - "frame_end", - "frames_length", - "frame_start_override", - "frame_end_override" + "value" ], - "short_name": "AnimationInfo", + "short_name": "GltfMaterialExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::animation::AnimationInfos": { + "bevy_gltf::GltfMeshExtras": { "additionalProperties": false, "isComponent": true, "isResource": false, - "long_name": "bevy_gltf_blueprints::animation::AnimationInfos", + "long_name": "bevy_gltf::GltfMeshExtras", "properties": { - "animations": { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - } - }, - "required": [ - "animations" - ], - "short_name": "AnimationInfos", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::animation::AnimationMarkers": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_gltf_blueprints::animation::AnimationMarkers", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - ], - "short_name": "AnimationMarkers", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::animation::BlueprintAnimations": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_blueprints::animation::BlueprintAnimations", - "properties": { - "named_animations": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - }, - "required": [ - "named_animations" - ], - "short_name": "BlueprintAnimations", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::animation::SceneAnimations": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_blueprints::animation::SceneAnimations", - "properties": { - "named_animations": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - }, - "required": [ - "named_animations" - ], - "short_name": "SceneAnimations", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::materials::MaterialInfo": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_blueprints::materials::MaterialInfo", - "properties": { - "name": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - }, - "source": { + "value": { "type": { "$ref": "#/$defs/alloc::string::String" } } }, "required": [ - "name", - "source" + "value" ], - "short_name": "MaterialInfo", + "short_name": "GltfMeshExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName": { + "bevy_gltf::GltfSceneExtras": { + "additionalProperties": false, "isComponent": true, "isResource": false, - "items": false, - "long_name": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName", - "prefixItems": [ - { + "long_name": "bevy_gltf::GltfSceneExtras", + "properties": { + "value": { "type": { "$ref": "#/$defs/alloc::string::String" } } - ], - "short_name": "BlueprintName", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - ], - "short_name": "BlueprintsList", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere", - "properties": {}, - "required": [], - "short_name": "SpawnHere", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::GltfProcessed": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_components::GltfProcessed", - "properties": {}, - "required": [], - "short_name": "GltfProcessed", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader", - "properties": { - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - }, - "strength": { - "type": { - "$ref": "#/$defs/f32" - } - } }, "required": [ - "color", - "strength" + "value" ], - "short_name": "BlenderBackgroundShader", + "short_name": "GltfSceneExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows", - "properties": { - "buffer_bias": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled", - "buffer_bias" - ], - "short_name": "BlenderLightShadows", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings", - "properties": { - "cascade_size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "cascade_size" - ], - "short_name": "BlenderShadowSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings", - "properties": {}, - "required": [], - "short_name": "SSAOSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable", - "properties": {}, - "required": [], - "short_name": "CameraTrackable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking", - "properties": { - "offset": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "offset" - ], - "short_name": "CameraTracking", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "CameraTrackingOffset", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", - "properties": {}, - "required": [], - "short_name": "Pickable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::game::player::Player": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common::game::player::Player", - "properties": {}, - "required": [], - "short_name": "Player", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider", - "oneOf": [ - "Cuboid", - "Ball", - "Capsule" - ], - "short_name": "AutoAABBCollider", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider", - "oneOf": [ - { - "items": false, - "long_name": "Ball", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Ball", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "Cuboid", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "Cuboid", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "Capsule", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Capsule", - "type": "array", - "typeInfo": "Tuple" - }, - { - "long_name": "Mesh" - } - ], - "short_name": "Collider", - "type": "object", - "typeInfo": "Enum" - }, "bevy_hierarchy::components::children::Children": { "isComponent": true, "isResource": false, @@ -4135,7 +4684,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" } } ], @@ -4314,6 +4863,37 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_input::gamepad::GamepadAxisChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisChangedEvent", + "properties": { + "axis_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "axis_type", + "value" + ], + "short_name": "GamepadAxisChangedEvent", + "type": "object", + "typeInfo": "Struct" + }, "bevy_input::gamepad::GamepadAxisType": { "isComponent": false, "isResource": false, @@ -4381,6 +4961,37 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_input::gamepad::GamepadButtonChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonChangedEvent", + "properties": { + "button_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "button_type", + "value" + ], + "short_name": "GamepadButtonChangedEvent", + "type": "object", + "typeInfo": "Struct" + }, "bevy_input::gamepad::GamepadButtonInput": { "additionalProperties": false, "isComponent": false, @@ -4514,6 +5125,102 @@ "type": "object", "typeInfo": "Enum" }, + "bevy_input::gamepad::GamepadConnectionEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnectionEvent", + "properties": { + "connection": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnection" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + } + }, + "required": [ + "gamepad", + "connection" + ], + "short_name": "GamepadConnectionEvent", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadEvent": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadEvent", + "oneOf": [ + { + "items": false, + "long_name": "Connection", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnectionEvent" + } + } + ], + "short_name": "Connection", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Button", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonChangedEvent" + } + } + ], + "short_name": "Button", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Axis", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisChangedEvent" + } + } + ], + "short_name": "Axis", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "GamepadEvent", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name" + ], + "short_name": "GamepadInfo", + "type": "object", + "typeInfo": "Struct" + }, "bevy_input::gamepad::GamepadSettings": { "additionalProperties": false, "isComponent": false, @@ -4563,6 +5270,65 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_input::gestures::DoubleTapGesture": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gestures::DoubleTapGesture", + "properties": {}, + "required": [], + "short_name": "DoubleTapGesture", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gestures::PanGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PanGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "PanGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::PinchGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PinchGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "PinchGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::RotationGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::RotationGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "RotationGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_input::keyboard::Key": { "isComponent": false, "isResource": false, @@ -6398,74 +7164,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_input::mouse::MouseMotion": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_input::mouse::MouseMotion", - "properties": { - "delta": { - "type": { - "$ref": "#/$defs/glam::Vec2" - } - } - }, - "required": [ - "delta" - ], - "short_name": "MouseMotion", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_input::mouse::MouseScrollUnit": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_input::mouse::MouseScrollUnit", - "oneOf": [ - "Line", - "Pixel" - ], - "short_name": "MouseScrollUnit", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_input::mouse::MouseWheel": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_input::mouse::MouseWheel", - "properties": { - "unit": { - "type": { - "$ref": "#/$defs/bevy_input::mouse::MouseScrollUnit" - } - }, - "window": { - "type": { - "$ref": "#/$defs/bevy_ecs::entity::Entity" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "unit", - "x", - "y", - "window" - ], - "short_name": "MouseWheel", - "type": "object", - "typeInfo": "Struct" - }, "bevy_input::touch::ForceTouch": { "isComponent": false, "isResource": false, @@ -6577,43 +7275,11 @@ "type": "string", "typeInfo": "Enum" }, - "bevy_input::touchpad::TouchpadMagnify": { - "isComponent": false, - "isResource": false, - "items": false, - "long_name": "bevy_input::touchpad::TouchpadMagnify", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "TouchpadMagnify", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_input::touchpad::TouchpadRotate": { - "isComponent": false, - "isResource": false, - "items": false, - "long_name": "bevy_input::touchpad::TouchpadRotate", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "TouchpadRotate", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_math::Rect": { + "bevy_math::rects::rect::Rect": { "additionalProperties": false, "isComponent": false, "isResource": false, - "long_name": "bevy_math::Rect", + "long_name": "bevy_math::rects::rect::Rect", "properties": { "max": { "type": { @@ -6634,44 +7300,30 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::alpha::AlphaMode": { + "bevy_math::rects::urect::URect": { + "additionalProperties": false, "isComponent": false, "isResource": false, - "long_name": "bevy_pbr::alpha::AlphaMode", - "oneOf": [ - { - "long_name": "Opaque" + "long_name": "bevy_math::rects::urect::URect", + "properties": { + "max": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } }, - { - "items": false, - "long_name": "Mask", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Mask", - "type": "array", - "typeInfo": "Tuple" - }, - { - "long_name": "Blend" - }, - { - "long_name": "Premultiplied" - }, - { - "long_name": "Add" - }, - { - "long_name": "Multiply" + "min": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } } + }, + "required": [ + "min", + "max" ], - "short_name": "AlphaMode", + "short_name": "URect", "type": "object", - "typeInfo": "Enum" + "typeInfo": "Struct" }, "bevy_pbr::bundle::CascadesVisibleEntities": { "additionalProperties": false, @@ -6695,6 +7347,145 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::cluster::ClusterConfig": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterConfig", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Single" + }, + { + "additionalProperties": false, + "long_name": "XYZ", + "properties": { + "dimensions": { + "long_name": "dimensions", + "type": { + "$ref": "#/$defs/glam::UVec3" + } + }, + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + } + }, + "required": [ + "dimensions", + "z_config", + "dynamic_resizing" + ], + "short_name": "XYZ", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "FixedZ", + "properties": { + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "total": { + "long_name": "total", + "type": { + "$ref": "#/$defs/u32" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + }, + "z_slices": { + "long_name": "z_slices", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "total", + "z_slices", + "z_config", + "dynamic_resizing" + ], + "short_name": "FixedZ", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ClusterConfig", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterFarZMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterFarZMode", + "oneOf": [ + { + "long_name": "MaxClusterableObjectRange" + }, + { + "items": false, + "long_name": "Constant", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Constant", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ClusterFarZMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterZConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterZConfig", + "properties": { + "far_z_mode": { + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterFarZMode" + } + }, + "first_slice_depth": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "first_slice_depth", + "far_z_mode" + ], + "short_name": "ClusterZConfig", + "type": "object", + "typeInfo": "Struct" + }, "bevy_pbr::fog::FogFalloff": { "isComponent": false, "isResource": false, @@ -6799,12 +7590,12 @@ "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "directional_light_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "directional_light_exponent": { @@ -6828,38 +7619,18 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::AmbientLight": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "long_name": "bevy_pbr::light::AmbientLight", - "properties": { - "brightness": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color", - "brightness" - ], - "short_name": "AmbientLight", - "type": "object", - "typeInfo": "Struct" - }, "bevy_pbr::light::Cascade": { "additionalProperties": false, "isComponent": false, "isResource": false, "long_name": "bevy_pbr::light::Cascade", "properties": { - "projection": { + "clip_from_cascade": { + "type": { + "$ref": "#/$defs/glam::Mat4" + } + }, + "clip_from_world": { "type": { "$ref": "#/$defs/glam::Mat4" } @@ -6869,21 +7640,16 @@ "$ref": "#/$defs/f32" } }, - "view_projection": { - "type": { - "$ref": "#/$defs/glam::Mat4" - } - }, - "view_transform": { + "world_from_cascade": { "type": { "$ref": "#/$defs/glam::Mat4" } } }, "required": [ - "view_transform", - "projection", - "view_projection", + "world_from_cascade", + "clip_from_cascade", + "clip_from_world", "texel_size" ], "short_name": "Cascade", @@ -6940,188 +7706,6 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::ClusterConfig": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_pbr::light::ClusterConfig", - "oneOf": [ - { - "long_name": "None" - }, - { - "long_name": "Single" - }, - { - "additionalProperties": false, - "long_name": "XYZ", - "properties": { - "dimensions": { - "long_name": "dimensions", - "type": { - "$ref": "#/$defs/glam::UVec3" - } - }, - "dynamic_resizing": { - "long_name": "dynamic_resizing", - "type": { - "$ref": "#/$defs/bool" - } - }, - "z_config": { - "long_name": "z_config", - "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterZConfig" - } - } - }, - "required": [ - "dimensions", - "z_config", - "dynamic_resizing" - ], - "short_name": "XYZ", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "FixedZ", - "properties": { - "dynamic_resizing": { - "long_name": "dynamic_resizing", - "type": { - "$ref": "#/$defs/bool" - } - }, - "total": { - "long_name": "total", - "type": { - "$ref": "#/$defs/u32" - } - }, - "z_config": { - "long_name": "z_config", - "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterZConfig" - } - }, - "z_slices": { - "long_name": "z_slices", - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "total", - "z_slices", - "z_config", - "dynamic_resizing" - ], - "short_name": "FixedZ", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "ClusterConfig", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_pbr::light::ClusterFarZMode": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_pbr::light::ClusterFarZMode", - "oneOf": [ - { - "long_name": "MaxLightRange" - }, - { - "items": false, - "long_name": "Constant", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Constant", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "ClusterFarZMode", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_pbr::light::ClusterZConfig": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_pbr::light::ClusterZConfig", - "properties": { - "far_z_mode": { - "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterFarZMode" - } - }, - "first_slice_depth": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "first_slice_depth", - "far_z_mode" - ], - "short_name": "ClusterZConfig", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::DirectionalLight": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_pbr::light::DirectionalLight", - "properties": { - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - }, - "illuminance": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "shadow_depth_bias": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "shadow_normal_bias": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "shadows_enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "color", - "illuminance", - "shadows_enabled", - "shadow_depth_bias", - "shadow_normal_bias" - ], - "short_name": "DirectionalLight", - "type": "object", - "typeInfo": "Struct" - }, "bevy_pbr::light::DirectionalLightShadowMap": { "additionalProperties": false, "isComponent": false, @@ -7163,15 +7747,115 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::PointLight": { + "bevy_pbr::light::PointLightShadowMap": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::PointLightShadowMap", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "size" + ], + "short_name": "PointLightShadowMap", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::ShadowFilteringMethod": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::ShadowFilteringMethod", + "oneOf": [ + "Hardware2x2", + "Gaussian", + "Temporal" + ], + "short_name": "ShadowFilteringMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::light::ambient_light::AmbientLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::ambient_light::AmbientLight", + "properties": { + "brightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "color", + "brightness" + ], + "short_name": "AmbientLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::directional_light::DirectionalLight": { "additionalProperties": false, "isComponent": true, "isResource": false, - "long_name": "bevy_pbr::light::PointLight", + "long_name": "bevy_pbr::light::directional_light::DirectionalLight", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "illuminance": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_normal_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadows_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "color", + "illuminance", + "shadows_enabled", + "shadow_depth_bias", + "shadow_normal_bias" + ], + "short_name": "DirectionalLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::point_light::PointLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::point_light::PointLight", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" } }, "intensity": { @@ -7218,47 +7902,15 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::PointLightShadowMap": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "long_name": "bevy_pbr::light::PointLightShadowMap", - "properties": { - "size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "size" - ], - "short_name": "PointLightShadowMap", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::ShadowFilteringMethod": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_pbr::light::ShadowFilteringMethod", - "oneOf": [ - "Hardware2x2", - "Castano13", - "Jimenez14" - ], - "short_name": "ShadowFilteringMethod", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_pbr::light::SpotLight": { + "bevy_pbr::light::spot_light::SpotLight": { "additionalProperties": false, "isComponent": true, "isResource": false, - "long_name": "bevy_pbr::light::SpotLight", + "long_name": "bevy_pbr::light::spot_light::SpotLight", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "inner_angle": { @@ -7452,12 +8104,32 @@ "properties": { "alpha_mode": { "type": { - "$ref": "#/$defs/bevy_pbr::alpha::AlphaMode" + "$ref": "#/$defs/bevy_render::alpha::AlphaMode" + } + }, + "anisotropy_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "anisotropy_rotation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "anisotropy_strength": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "anisotropy_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" } }, "attenuation_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "attenuation_distance": { @@ -7467,7 +8139,12 @@ }, "base_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "base_color_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" } }, "base_color_texture": { @@ -7475,6 +8152,16 @@ "$ref": "#/$defs/core::option::Option>" } }, + "clearcoat": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "clearcoat_perceptual_roughness": { + "type": { + "$ref": "#/$defs/f32" + } + }, "deferred_lighting_pass_id": { "type": { "$ref": "#/$defs/u8" @@ -7502,7 +8189,17 @@ }, "emissive": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + }, + "emissive_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "emissive_exposure_weight": { + "type": { + "$ref": "#/$defs/f32" } }, "emissive_texture": { @@ -7540,16 +8237,31 @@ "$ref": "#/$defs/f32" } }, + "metallic_roughness_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "metallic_roughness_texture": { "type": { "$ref": "#/$defs/core::option::Option>" } }, + "normal_map_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "normal_map_texture": { "type": { "$ref": "#/$defs/core::option::Option>" } }, + "occlusion_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "occlusion_texture": { "type": { "$ref": "#/$defs/core::option::Option>" @@ -7594,13 +8306,22 @@ "type": { "$ref": "#/$defs/bool" } + }, + "uv_transform": { + "type": { + "$ref": "#/$defs/glam::Affine2" + } } }, "required": [ "base_color", + "base_color_channel", "emissive", + "emissive_exposure_weight", + "emissive_channel", "perceptual_roughness", "metallic", + "metallic_roughness_channel", "reflectance", "diffuse_transmission", "specular_transmission", @@ -7608,7 +8329,14 @@ "ior", "attenuation_distance", "attenuation_color", + "normal_map_channel", "flip_normal_map_y", + "occlusion_channel", + "clearcoat", + "clearcoat_perceptual_roughness", + "anisotropy_strength", + "anisotropy_rotation", + "anisotropy_channel", "double_sided", "unlit", "fog_enabled", @@ -7619,12 +8347,72 @@ "max_parallax_layer_count", "lightmap_exposure", "opaque_render_method", - "deferred_lighting_pass_id" + "deferred_lighting_pass_id", + "uv_transform" ], "short_name": "StandardMaterial", "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::pbr_material::UvChannel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::pbr_material::UvChannel", + "oneOf": [ + "Uv0", + "Uv1" + ], + "short_name": "UvChannel", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel", + "oneOf": [ + { + "long_name": "Low" + }, + { + "long_name": "Medium" + }, + { + "long_name": "High" + }, + { + "long_name": "Ultra" + }, + { + "additionalProperties": false, + "long_name": "Custom", + "properties": { + "samples_per_slice_side": { + "long_name": "samples_per_slice_side", + "type": { + "$ref": "#/$defs/u32" + } + }, + "slice_count": { + "long_name": "slice_count", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "slice_count", + "samples_per_slice_side" + ], + "short_name": "Custom", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ScreenSpaceAmbientOcclusionQualityLevel", + "type": "object", + "typeInfo": "Enum" + }, "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings": { "additionalProperties": false, "isComponent": true, @@ -7644,80 +8432,156 @@ "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::wireframe::NoWireframe": { + "bevy_pbr::ssr::ScreenSpaceReflectionsSettings": { "additionalProperties": false, "isComponent": true, "isResource": false, - "long_name": "bevy_pbr::wireframe::NoWireframe", - "properties": {}, - "required": [], - "short_name": "NoWireframe", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::Wireframe": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_pbr::wireframe::Wireframe", - "properties": {}, - "required": [], - "short_name": "Wireframe", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::WireframeColor": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_pbr::wireframe::WireframeColor", + "long_name": "bevy_pbr::ssr::ScreenSpaceReflectionsSettings", "properties": { - "color": { + "bisection_steps": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color" - ], - "short_name": "WireframeColor", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::WireframeConfig": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "long_name": "bevy_pbr::wireframe::WireframeConfig", - "properties": { - "default_color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/u32" } }, - "global": { + "linear_march_exponent": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "linear_steps": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "perceptual_roughness_threshold": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "thickness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "use_secant": { "type": { "$ref": "#/$defs/bool" } } }, "required": [ - "global", - "default_color" + "perceptual_roughness_threshold", + "thickness", + "linear_steps", + "linear_march_exponent", + "bisection_steps", + "use_secant" ], - "short_name": "WireframeConfig", + "short_name": "ScreenSpaceReflectionsSettings", "type": "object", "typeInfo": "Struct" }, - "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties": { + "bevy_pbr::volumetric_fog::VolumetricFogSettings": { + "additionalProperties": false, "isComponent": true, "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties", + "long_name": "bevy_pbr::volumetric_fog::VolumetricFogSettings", + "properties": { + "absorption": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "ambient_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "ambient_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "density": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fog_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "light_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "light_tint": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "max_depth": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering_asymmetry": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "step_count": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "fog_color", + "ambient_color", + "ambient_intensity", + "step_count", + "max_depth", + "absorption", + "scattering", + "density", + "scattering_asymmetry", + "light_tint", + "light_intensity" + ], + "short_name": "VolumetricFogSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::volumetric_fog::VolumetricLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricLight", + "properties": {}, + "required": [], + "short_name": "VolumetricLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::alpha::AlphaMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::alpha::AlphaMode", "oneOf": [ + { + "long_name": "Opaque" + }, { "items": false, - "long_name": "Mass", + "long_name": "Mask", "prefixItems": [ { "type": { @@ -7725,459 +8589,30 @@ } } ], - "short_name": "Mass", + "short_name": "Mask", "type": "array", "typeInfo": "Tuple" }, { - "items": false, - "long_name": "MassProperties", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::rigid_body::MassProperties" - } - } - ], - "short_name": "MassProperties", - "type": "array", - "typeInfo": "Tuple" + "long_name": "Blend" + }, + { + "long_name": "Premultiplied" + }, + { + "long_name": "AlphaToCoverage" + }, + { + "long_name": "Add" + }, + { + "long_name": "Multiply" } ], - "short_name": "AdditionalMassProperties", + "short_name": "AlphaMode", "type": "object", "typeInfo": "Enum" }, - "bevy_rapier3d::dynamics::rigid_body::Ccd": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::Ccd", - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "Ccd", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Damping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::Damping", - "properties": { - "angular_damping": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "linear_damping": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "linear_damping", - "angular_damping" - ], - "short_name": "Damping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Dominance": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::Dominance", - "properties": { - "groups": { - "type": { - "$ref": "#/$defs/i8" - } - } - }, - "required": [ - "groups" - ], - "short_name": "Dominance", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalForce": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::ExternalForce", - "properties": { - "force": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "force", - "torque" - ], - "short_name": "ExternalForce", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse", - "properties": { - "impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque_impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "impulse", - "torque_impulse" - ], - "short_name": "ExternalImpulse", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::GravityScale": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::GravityScale", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "GravityScale", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::LockedAxes": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::LockedAxes", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u8" - } - } - ], - "short_name": "LockedAxes", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::MassProperties": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::MassProperties", - "properties": { - "local_center_of_mass": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "mass": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "principal_inertia": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "principal_inertia_local_frame": { - "type": { - "$ref": "#/$defs/glam::Quat" - } - } - }, - "required": [ - "local_center_of_mass", - "mass", - "principal_inertia_local_frame", - "principal_inertia" - ], - "short_name": "MassProperties", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::RigidBody": { - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::RigidBody", - "oneOf": [ - "Dynamic", - "Fixed", - "KinematicPositionBased", - "KinematicVelocityBased" - ], - "short_name": "RigidBody", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_rapier3d::dynamics::rigid_body::Sleeping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::Sleeping", - "properties": { - "angular_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "linear_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "sleeping": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "linear_threshold", - "angular_threshold", - "sleeping" - ], - "short_name": "Sleeping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Velocity": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::dynamics::rigid_body::Velocity", - "properties": { - "angvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "linvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "linvel", - "angvel" - ], - "short_name": "Velocity", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::CollidingEntities": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_rapier3d::geometry::collider::CollidingEntities", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::HashSet" - } - } - ], - "short_name": "CollidingEntities", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::CollisionGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::geometry::collider::CollisionGroups", - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "CollisionGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::ContactForceEventThreshold": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_rapier3d::geometry::collider::ContactForceEventThreshold", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "ContactForceEventThreshold", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Friction": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::geometry::collider::Friction", - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Friction", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Group": { - "isComponent": true, - "isResource": false, - "items": false, - "long_name": "bevy_rapier3d::geometry::collider::Group", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u32" - } - } - ], - "short_name": "Group", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Restitution": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::geometry::collider::Restitution", - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Restitution", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Sensor": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::geometry::collider::Sensor", - "properties": {}, - "required": [], - "short_name": "Sensor", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::SolverGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "long_name": "bevy_rapier3d::geometry::collider::SolverGroups", - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "SolverGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::render::DebugRenderContext": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "long_name": "bevy_rapier3d::render::DebugRenderContext", - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "DebugRenderContext", - "type": "object", - "typeInfo": "Struct" - }, "bevy_render::camera::camera::Camera": { "additionalProperties": false, "isComponent": true, @@ -8250,57 +8685,40 @@ "type": "object", "typeInfo": "Value" }, - "bevy_render::camera::camera::RenderTarget": { - "isComponent": false, + "bevy_render::camera::camera::MipBias": { + "isComponent": true, "isResource": false, - "long_name": "bevy_render::camera::camera::RenderTarget", - "oneOf": [ + "items": false, + "long_name": "bevy_render::camera::camera::MipBias", + "prefixItems": [ { - "items": false, - "long_name": "Window", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_window::window::WindowRef" - } - } - ], - "short_name": "Window", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "Image", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } - } - ], - "short_name": "Image", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "long_name": "TextureView", - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::camera::manual_texture_view::ManualTextureViewHandle" - } - } - ], - "short_name": "TextureView", - "type": "array", - "typeInfo": "Tuple" + "type": { + "$ref": "#/$defs/f32" + } } ], - "short_name": "RenderTarget", + "short_name": "MipBias", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::camera::TemporalJitter": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::TemporalJitter", + "properties": { + "offset": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "offset" + ], + "short_name": "TemporalJitter", "type": "object", - "typeInfo": "Enum" + "typeInfo": "Struct" }, "bevy_render::camera::camera::Viewport": { "additionalProperties": false, @@ -8341,7 +8759,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], @@ -8363,7 +8781,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], @@ -8387,7 +8805,7 @@ "properties": { "area": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } }, "far": { @@ -8630,172 +9048,6 @@ "type": "object", "typeInfo": "Enum" }, - "bevy_render::color::Color": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_render::color::Color", - "oneOf": [ - { - "additionalProperties": false, - "long_name": "Rgba", - "properties": { - "alpha": { - "long_name": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "blue": { - "long_name": "blue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "green": { - "long_name": "green", - "type": { - "$ref": "#/$defs/f32" - } - }, - "red": { - "long_name": "red", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "short_name": "Rgba", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "RgbaLinear", - "properties": { - "alpha": { - "long_name": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "blue": { - "long_name": "blue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "green": { - "long_name": "green", - "type": { - "$ref": "#/$defs/f32" - } - }, - "red": { - "long_name": "red", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "short_name": "RgbaLinear", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "Hsla", - "properties": { - "alpha": { - "long_name": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "hue": { - "long_name": "hue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "lightness": { - "long_name": "lightness", - "type": { - "$ref": "#/$defs/f32" - } - }, - "saturation": { - "long_name": "saturation", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "hue", - "saturation", - "lightness", - "alpha" - ], - "short_name": "Hsla", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "long_name": "Lcha", - "properties": { - "alpha": { - "long_name": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "chroma": { - "long_name": "chroma", - "type": { - "$ref": "#/$defs/f32" - } - }, - "hue": { - "long_name": "hue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "lightness": { - "long_name": "lightness", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "lightness", - "chroma", - "hue", - "alpha" - ], - "short_name": "Lcha", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "Color", - "type": "object", - "typeInfo": "Enum" - }, "bevy_render::globals::GlobalsUniform": { "additionalProperties": false, "isComponent": false, @@ -9025,6 +9277,14 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_render::render_asset::RenderAssetUsages": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::render_asset::RenderAssetUsages", + "short_name": "RenderAssetUsages", + "type": "object", + "typeInfo": "Value" + }, "bevy_render::texture::image::Image": { "isComponent": false, "isResource": false, @@ -9038,35 +9298,127 @@ "isComponent": true, "isResource": false, "long_name": "bevy_render::view::ColorGrading", + "properties": { + "global": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingGlobal" + } + }, + "highlights": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "midtones": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "shadows": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + } + }, + "required": [ + "global", + "shadows", + "midtones", + "highlights" + ], + "short_name": "ColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingGlobal": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingGlobal", "properties": { "exposure": { "type": { "$ref": "#/$defs/f32" } }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "midtones_range": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "post_saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "temperature": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "tint": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "temperature", + "tint", + "hue", + "post_saturation", + "midtones_range" + ], + "short_name": "ColorGradingGlobal", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingSection": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingSection", + "properties": { + "contrast": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gain": { + "type": { + "$ref": "#/$defs/f32" + } + }, "gamma": { "type": { "$ref": "#/$defs/f32" } }, - "post_saturation": { + "lift": { "type": { "$ref": "#/$defs/f32" } }, - "pre_saturation": { + "saturation": { "type": { "$ref": "#/$defs/f32" } } }, "required": [ - "exposure", + "saturation", + "contrast", "gamma", - "pre_saturation", - "post_saturation" + "gain", + "lift" ], - "short_name": "ColorGrading", + "short_name": "ColorGradingSection", "type": "object", "typeInfo": "Struct" }, @@ -9151,6 +9503,31 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_render::view::visibility::range::VisibilityRange": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::visibility::range::VisibilityRange", + "properties": { + "end_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "start_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + } + }, + "required": [ + "start_margin", + "end_margin" + ], + "short_name": "VisibilityRange", + "type": "object", + "typeInfo": "Struct" + }, "bevy_render::view::visibility::render_layers::RenderLayers": { "isComponent": true, "isResource": false, @@ -9159,7 +9536,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/u32" + "$ref": "#/$defs/smallvec::SmallVec<[u64; 1]>" } } ], @@ -9167,6 +9544,17 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_sprite::SpriteSource": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_sprite::SpriteSource", + "properties": {}, + "required": [], + "short_name": "SpriteSource", + "type": "object", + "typeInfo": "Struct" + }, "bevy_sprite::mesh2d::color_material::ColorMaterial": { "additionalProperties": false, "isComponent": false, @@ -9175,7 +9563,7 @@ "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "texture": { @@ -9327,7 +9715,7 @@ }, "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "custom_size": { @@ -9347,7 +9735,7 @@ }, "rect": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } } }, @@ -9394,7 +9782,7 @@ "properties": { "size": { "type": { - "$ref": "#/$defs/glam::Vec2" + "$ref": "#/$defs/glam::UVec2" } }, "texture_handles": { @@ -9404,7 +9792,7 @@ }, "textures": { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } }, @@ -9416,6 +9804,74 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_sprite::texture_slice::border_rect::BorderRect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::border_rect::BorderRect", + "properties": { + "bottom": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "left": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "right": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "top": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "left", + "right", + "top", + "bottom" + ], + "short_name": "BorderRect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_slice::slicer::SliceScaleMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::SliceScaleMode", + "oneOf": [ + { + "long_name": "Stretch" + }, + { + "additionalProperties": false, + "long_name": "Tile", + "properties": { + "stretch_value": { + "long_name": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "stretch_value" + ], + "short_name": "Tile", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "SliceScaleMode", + "type": "object", + "typeInfo": "Enum" + }, "bevy_sprite::texture_slice::slicer::TextureSlicer": { "additionalProperties": false, "isComponent": false, @@ -9453,6 +9909,80 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_text::font_atlas_set::GlyphAtlasInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::font_atlas_set::GlyphAtlasInfo", + "properties": { + "glyph_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "texture": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "texture_atlas": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "texture_atlas", + "texture", + "glyph_index" + ], + "short_name": "GlyphAtlasInfo", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::glyph_brush::PositionedGlyph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::glyph_brush::PositionedGlyph", + "properties": { + "atlas_info": { + "type": { + "$ref": "#/$defs/bevy_text::font_atlas_set::GlyphAtlasInfo" + } + }, + "byte_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "section_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "position", + "size", + "atlas_info", + "section_index", + "byte_index" + ], + "short_name": "PositionedGlyph", + "type": "object", + "typeInfo": "Struct" + }, "bevy_text::pipeline::TextLayoutInfo": { "additionalProperties": false, "isComponent": true, @@ -9587,7 +10117,7 @@ "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "font": { @@ -9610,6 +10140,60 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_time::fixed::Fixed": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::fixed::Fixed", + "properties": { + "overstep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "timestep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "timestep", + "overstep" + ], + "short_name": "Fixed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::real::Real": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::real::Real", + "properties": { + "first_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "last_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "startup": { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + }, + "required": [ + "startup" + ], + "short_name": "Real", + "type": "object", + "typeInfo": "Struct" + }, "bevy_time::stopwatch::Stopwatch": { "additionalProperties": false, "isComponent": false, @@ -9994,6 +10578,18 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_time::timer::TimerMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::timer::TimerMode", + "oneOf": [ + "Once", + "Repeating" + ], + "short_name": "TimerMode", + "type": "string", + "typeInfo": "Enum" + }, "bevy_time::virt::Virtual": { "additionalProperties": false, "isComponent": false, @@ -10132,7 +10728,7 @@ }, "normalized_visible_node_rect": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } } }, @@ -10352,7 +10948,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], @@ -10368,7 +10964,7 @@ "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], @@ -10376,6 +10972,43 @@ "type": "array", "typeInfo": "TupleStruct" }, + "bevy_ui::ui_node::BorderRadius": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::BorderRadius", + "properties": { + "bottom_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "bottom_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "top_left", + "top_right", + "bottom_left", + "bottom_right" + ], + "short_name": "BorderRadius", + "type": "object", + "typeInfo": "Struct" + }, "bevy_ui::ui_node::CalculatedClip": { "additionalProperties": false, "isComponent": true, @@ -10384,7 +11017,7 @@ "properties": { "clip": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } } }, @@ -10415,6 +11048,7 @@ "oneOf": [ "Flex", "Grid", + "Block", "None" ], "short_name": "Display", @@ -10514,6 +11148,36 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_ui::ui_node::GridTrackRepetition": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrackRepetition", + "oneOf": [ + { + "items": false, + "long_name": "Count", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Count", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "AutoFill" + }, + { + "long_name": "AutoFit" + } + ], + "short_name": "GridTrackRepetition", + "type": "object", + "typeInfo": "Enum" + }, "bevy_ui::ui_node::JustifyContent": { "isComponent": false, "isResource": false, @@ -10566,6 +11230,22 @@ "type": "string", "typeInfo": "Enum" }, + "bevy_ui::ui_node::MaxTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MaxTrackSizingFunction", + "short_name": "MaxTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, + "bevy_ui::ui_node::MinTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MinTrackSizingFunction", + "short_name": "MinTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, "bevy_ui::ui_node::Node": { "additionalProperties": false, "isComponent": true, @@ -10617,7 +11297,7 @@ "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "offset": { @@ -10671,7 +11351,8 @@ "long_name": "bevy_ui::ui_node::OverflowAxis", "oneOf": [ "Visible", - "Clip" + "Clip", + "Hidden" ], "short_name": "OverflowAxis", "type": "string", @@ -10702,7 +11383,7 @@ }, "tracks": { "type": { - "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" } } }, @@ -10976,6 +11657,11 @@ "isResource": false, "long_name": "bevy_ui::ui_node::UiImage", "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, "flip_x": { "type": { "$ref": "#/$defs/bool" @@ -10993,6 +11679,7 @@ } }, "required": [ + "color", "texture", "flip_x", "flip_y" @@ -11058,7 +11745,7 @@ "properties": { "size": { "type": { - "$ref": "#/$defs/glam::Vec2" + "$ref": "#/$defs/glam::UVec2" } } }, @@ -11113,14 +11800,6 @@ "type": "object", "typeInfo": "Value" }, - "bevy_utils::HashSet": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_utils::HashSet", - "short_name": "HashSet", - "type": "object", - "typeInfo": "Value" - }, "bevy_utils::Instant": { "isComponent": false, "isResource": false, @@ -11129,14 +11808,6 @@ "type": "object", "typeInfo": "Value" }, - "bevy_utils::Uuid": { - "isComponent": false, - "isResource": false, - "long_name": "bevy_utils::Uuid", - "short_name": "Uuid", - "type": "object", - "typeInfo": "Value" - }, "bevy_utils::hashbrown::HashMap": { "isComponent": false, "isResource": false, @@ -11173,7 +11844,7 @@ } } }, - "bevy_utils::hashbrown::HashMap": { + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { "isComponent": false, "isResource": false, "keyType": { @@ -11181,13 +11852,31 @@ "$ref": "#/$defs/alloc::string::String" } }, - "long_name": "bevy_utils::hashbrown::HashMap", + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", "short_name": "HashMap", "type": "object", "typeInfo": "Map", "valueType": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } }, @@ -11227,6 +11916,132 @@ } } }, + "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>", + "short_name": "HashMap, NoOpHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, usize, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>", + "short_name": "HashMap, EntityHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxis" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, "bevy_utils::hashbrown::HashMap": { "isComponent": false, "isResource": false, @@ -11263,7 +12078,7 @@ } } }, - "bevy_utils::hashbrown::HashMap": { + "bevy_utils::hashbrown::HashMap": { "isComponent": false, "isResource": false, "keyType": { @@ -11271,29 +12086,16 @@ "$ref": "#/$defs/u32" } }, - "long_name": "bevy_utils::hashbrown::HashMap", + "long_name": "bevy_utils::hashbrown::HashMap", "short_name": "HashMap", "type": "object", "typeInfo": "Map", "valueType": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } }, - "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/bevy_ecs::entity::Entity" - } - }, - "long_name": "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", - "short_name": "SmallVec<[Entity; 8]>", - "type": "array", - "typeInfo": "List" - }, "bevy_window::cursor::CursorIcon": { "isComponent": false, "isResource": false, @@ -11338,16 +12140,18 @@ "type": "string", "typeInfo": "Enum" }, - "bevy_window::event::ApplicationLifetime": { + "bevy_window::event::AppLifecycle": { "isComponent": false, "isResource": false, - "long_name": "bevy_window::event::ApplicationLifetime", + "long_name": "bevy_window::event::AppLifecycle", "oneOf": [ - "Started", + "Idle", + "Running", + "WillSuspend", "Suspended", - "Resumed" + "WillResume" ], - "short_name": "ApplicationLifetime", + "short_name": "AppLifecycle", "type": "string", "typeInfo": "Enum" }, @@ -11596,6 +12400,25 @@ "type": "object", "typeInfo": "Struct" }, + "bevy_window::event::WindowClosing": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowClosing", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowClosing", + "type": "object", + "typeInfo": "Struct" + }, "bevy_window::event::WindowCreated": { "additionalProperties": false, "isComponent": false, @@ -11977,11 +12800,21 @@ "$ref": "#/$defs/bool" } }, + "desired_maximum_frame_latency": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "enabled_buttons": { "type": { "$ref": "#/$defs/bevy_window::window::EnabledButtons" } }, + "fit_canvas_to_parent": { + "type": { + "$ref": "#/$defs/bool" + } + }, "focused": { "type": { "$ref": "#/$defs/bool" @@ -12027,6 +12860,26 @@ "$ref": "#/$defs/bool" } }, + "recognize_doubletap_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_pan_gesture": { + "type": { + "$ref": "#/$defs/core::option::Option<(u8, u8)>" + } + }, + "recognize_pinch_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_rotation_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, "resizable": { "type": { "$ref": "#/$defs/bool" @@ -12042,6 +12895,11 @@ "$ref": "#/$defs/bevy_window::window::WindowResolution" } }, + "skip_taskbar": { + "type": { + "$ref": "#/$defs/bool" + } + }, "title": { "type": { "$ref": "#/$defs/alloc::string::String" @@ -12083,11 +12941,16 @@ "transparent", "focused", "window_level", + "fit_canvas_to_parent", "prevent_default_event_handling", "internal", "ime_enabled", "ime_position", - "visible" + "visible", + "skip_taskbar", + "recognize_pinch_gesture", + "recognize_rotation_gesture", + "recognize_doubletap_gesture" ], "short_name": "Window", "type": "object", @@ -12246,6 +13109,333 @@ "type": "string", "typeInfo": "Enum" }, + "blenvy::blueprints::animation::AnimationInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfo", + "properties": { + "frame_end": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_end_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frames_length": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "frame_start", + "frame_end", + "frames_length", + "frame_start_override", + "frame_end_override" + ], + "short_name": "AnimationInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationInfos": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfos", + "properties": { + "animations": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "animations" + ], + "short_name": "AnimationInfos", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationMarkers": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::animation::AnimationMarkers", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "AnimationMarkers", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::animation::BlueprintAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::BlueprintAnimations", + "properties": { + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + }, + "required": [ + "named_animations" + ], + "short_name": "BlueprintAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::SceneAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::SceneAnimations", + "properties": { + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + }, + "required": [ + "named_animations" + ], + "short_name": "SceneAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::AllAssets": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::assets::AllAssets", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "AllAssets", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::assets::LocalAssets": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::assets::LocalAssets", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "LocalAssets", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::assets::MyAsset": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::MyAsset", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "MyAsset", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::materials::MaterialInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::materials::MaterialInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "MaterialInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::BlueprintName": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintName", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "BlueprintName", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::spawn_from_blueprints::BlueprintPath": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintPath", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "BlueprintPath", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::spawn_from_blueprints::SpawnHere": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::SpawnHere", + "properties": {}, + "required": [], + "short_name": "SpawnHere", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::GltfProcessed", + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderBackgroundShader", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderLightShadows", + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderShadowSettings", + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, "bool": { "isComponent": false, "isResource": false, @@ -12262,6 +13452,30 @@ "type": "string", "typeInfo": "Value" }, + "core::num::NonZeroI16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroI16", + "short_name": "NonZeroI16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU16", + "short_name": "NonZeroU16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU32": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU32", + "short_name": "NonZeroU32", + "type": "object", + "typeInfo": "Value" + }, "core::ops::Range": { "isComponent": false, "isResource": false, @@ -12270,13 +13484,32 @@ "type": "object", "typeInfo": "Value" }, - "core::ops::Range": { + "core::option::Option<(u8, u8)>": { "isComponent": false, "isResource": false, - "long_name": "core::ops::Range", - "short_name": "Range", + "long_name": "core::option::Option<(u8, u8)>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/(u8, u8)" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option<(u8, u8)>", "type": "object", - "typeInfo": "Value" + "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, @@ -12332,6 +13565,33 @@ "type": "object", "typeInfo": "Enum" }, + "core::option::Option>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option>", + "type": "object", + "typeInfo": "Enum" + }, "core::option::Option>": { "isComponent": false, "isResource": false, @@ -12359,6 +13619,114 @@ "type": "object", "typeInfo": "Enum" }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::touch::ForceTouch" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, "core::option::Option": { "isComponent": false, "isResource": false, @@ -12413,6 +13781,87 @@ "type": "object", "typeInfo": "Enum" }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option, usize, DefaultHashBuilder>>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowTheme" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, "core::option::Option": { "isComponent": false, "isResource": false, @@ -12440,6 +13889,114 @@ "type": "object", "typeInfo": "Enum" }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/char" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroI16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU32" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, "core::option::Option": { "isComponent": false, "isResource": false, @@ -12521,6 +14078,60 @@ "type": "object", "typeInfo": "Enum" }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, "f32": { "isComponent": false, "isResource": false, @@ -12587,295 +14198,6 @@ "type": "object", "typeInfo": "Struct" }, - "glam::BVec2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::BVec2", - "properties": { - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y" - ], - "short_name": "BVec2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::BVec3", - "properties": { - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "z": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "BVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec3A": { - "isComponent": false, - "isResource": false, - "long_name": "glam::BVec3A", - "short_name": "BVec3A", - "type": "object", - "typeInfo": "Value" - }, - "glam::BVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::BVec4", - "properties": { - "w": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "z": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "BVec4", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec4A": { - "isComponent": false, - "isResource": false, - "long_name": "glam::BVec4A", - "short_name": "BVec4A", - "type": "object", - "typeInfo": "Value" - }, - "glam::DAffine2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DAffine2", - "properties": { - "matrix2": { - "type": { - "$ref": "#/$defs/glam::DMat2" - } - }, - "translation": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - } - }, - "required": [ - "matrix2", - "translation" - ], - "short_name": "DAffine2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DAffine3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DAffine3", - "properties": { - "matrix3": { - "type": { - "$ref": "#/$defs/glam::DMat3" - } - }, - "translation": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - } - }, - "required": [ - "matrix3", - "translation" - ], - "short_name": "DAffine3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DMat2", - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - } - }, - "required": [ - "x_axis", - "y_axis" - ], - "short_name": "DMat2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DMat3", - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis" - ], - "short_name": "DMat3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DMat4", - "properties": { - "w_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis", - "w_axis" - ], - "short_name": "DMat4", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DQuat": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DQuat", - "properties": { - "w": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "DQuat", - "type": "object", - "typeInfo": "Struct" - }, "glam::DVec2": { "additionalProperties": false, "isComponent": false, @@ -12901,74 +14223,6 @@ "type": "object", "typeInfo": "Struct" }, - "glam::DVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DVec3", - "properties": { - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "DVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::DVec4", - "properties": { - "w": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "DVec4", - "type": "object", - "typeInfo": "Struct" - }, "glam::IVec2": { "additionalProperties": false, "isComponent": false, @@ -12994,74 +14248,6 @@ "type": "object", "typeInfo": "Struct" }, - "glam::IVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::IVec3", - "properties": { - "x": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/i32" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "IVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::IVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::IVec4", - "properties": { - "w": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "x": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/i32" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "IVec4", - "type": "object", - "typeInfo": "Struct" - }, "glam::Mat2": { "additionalProperties": false, "isComponent": false, @@ -13087,37 +14273,6 @@ "type": "object", "typeInfo": "Struct" }, - "glam::Mat3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::Mat3", - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis" - ], - "short_name": "Mat3", - "type": "object", - "typeInfo": "Struct" - }, "glam::Mat3A": { "additionalProperties": false, "isComponent": false, @@ -13279,43 +14434,6 @@ "type": "object", "typeInfo": "Struct" }, - "glam::UVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "long_name": "glam::UVec4", - "properties": { - "w": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "x": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "UVec4", - "type": "object", - "typeInfo": "Struct" - }, "glam::Vec2": { "additionalProperties": false, "isComponent": false, @@ -13488,14 +14606,87 @@ "type": "int", "typeInfo": "Value" }, - "std::ffi::OsString": { + "petgraph::graph::DiGraph": { "isComponent": false, "isResource": false, - "long_name": "std::ffi::OsString", - "short_name": "OsString", + "long_name": "petgraph::graph::DiGraph", + "short_name": "DiGraph", "type": "object", "typeInfo": "Value" }, + "petgraph::graph::NodeIndex": { + "isComponent": false, + "isResource": false, + "long_name": "petgraph::graph::NodeIndex", + "short_name": "NodeIndex", + "type": "object", + "typeInfo": "Value" + }, + "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", + "short_name": "SmallVec<[Entity; 8]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>", + "short_name": "SmallVec<[GridTrack; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[u64; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "long_name": "smallvec::SmallVec<[u64; 1]>", + "short_name": "SmallVec<[u64; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smol_str::SmolStr": { + "isComponent": false, + "isResource": false, + "long_name": "smol_str::SmolStr", + "short_name": "SmolStr", + "type": "object", + "typeInfo": "Value" + }, + "std::collections::BTreeMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "std::collections::BTreeMap", + "short_name": "BTreeMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_animation::ActiveAnimation" + } + } + }, "std::path::PathBuf": { "isComponent": false, "isResource": false, @@ -13504,6 +14695,14 @@ "type": "object", "typeInfo": "Value" }, + "std::sync::Arc": { + "isComponent": false, + "isResource": false, + "long_name": "std::sync::Arc", + "short_name": "Arc", + "type": "object", + "typeInfo": "Value" + }, "u128": { "isComponent": false, "isResource": false, @@ -13551,6 +14750,14 @@ "short_name": "usize", "type": "uint", "typeInfo": "Value" + }, + "uuid::Uuid": { + "isComponent": false, + "isResource": false, + "long_name": "uuid::Uuid", + "short_name": "Uuid", + "type": "object", + "typeInfo": "Value" } }, "$schema": "https://json-schema.org/draft/2020-12/schema", diff --git a/testing/bevy_example/src/core/mod.rs b/testing/bevy_example/src/core/mod.rs index 5909421..2b572ee 100644 --- a/testing/bevy_example/src/core/mod.rs +++ b/testing/bevy_example/src/core/mod.rs @@ -1,16 +1,29 @@ use std::any::TypeId; use bevy::{prelude::*, utils::HashSet}; -use bevy_gltf_blueprints::*; -use bevy_registry_export::*; +use blenvy::*; + +/*use bevy_gltf_blueprints::*; +use bevy_registry_export::*; */ use crate::{ComponentAToFilterOut, ComponentBToFilterOut}; pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { - app.add_plugins(( - ExportRegistryPlugin { + app.add_plugins( + BlenvyPlugin { + aabbs: true, + registry_component_filter: SceneFilter::Denylist(HashSet::from([ + // this is using Bevy's build in SceneFilter, you can compose what components you want to allow/deny + TypeId::of::(), + TypeId::of::(), + // and any other commponent you want to include/exclude + ])), + ..Default::default() + } + + /* ExportRegistryPlugin { component_filter: SceneFilter::Denylist(HashSet::from([ // this is using Bevy's build in SceneFilter, you can compose what components you want to allow/deny TypeId::of::(), @@ -23,7 +36,7 @@ impl Plugin for CorePlugin { material_library: true, aabbs: true, ..Default::default() - }, - )); + }, */ + ); } } diff --git a/testing/bevy_example/src/game/animation.rs b/testing/bevy_example/src/game/animation.rs index 8dd2783..6ff29d9 100644 --- a/testing/bevy_example/src/game/animation.rs +++ b/testing/bevy_example/src/game/animation.rs @@ -1,12 +1,17 @@ use std::time::Duration; -use bevy_gltf_blueprints::{ +/*use bevy_gltf_blueprints::{ + AnimationInfos, AnimationMarkerReached, BlueprintAnimationPlayerLink, BlueprintAnimations, + SceneAnimationPlayerLink, SceneAnimations, +};*/ + +use bevy::{gltf::Gltf, prelude::*}; + +use blenvy::{ AnimationInfos, AnimationMarkerReached, BlueprintAnimationPlayerLink, BlueprintAnimations, SceneAnimationPlayerLink, SceneAnimations, }; -use bevy::{gltf::Gltf, prelude::*}; - #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] /// flag component for testing diff --git a/testing/bevy_example/src/game/in_game.rs b/testing/bevy_example/src/game/in_game.rs index 5afec9e..3b6ecea 100644 --- a/testing/bevy_example/src/game/in_game.rs +++ b/testing/bevy_example/src/game/in_game.rs @@ -1,5 +1,6 @@ use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, BlueprintPath, GameWorldTag}; +// use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, BlueprintPath, GameWorldTag}; +use blenvy::{BluePrintBundle, BlueprintName, BlueprintPath, GameWorldTag, SpawnHere}; use crate::{GameState, InAppRunning}; //use bevy_rapier3d::prelude::Velocity; @@ -25,6 +26,7 @@ pub fn setup_game( BlueprintName("World".into()), BlueprintPath("levels/World.glb".into()), bevy::prelude::Name::from("world"), + SpawnHere, GameWorldTag, InAppRunning, )); diff --git a/testing/bevy_example/src/game/mod.rs b/testing/bevy_example/src/game/mod.rs index 3c47dc6..96cd046 100644 --- a/testing/bevy_example/src/game/mod.rs +++ b/testing/bevy_example/src/game/mod.rs @@ -6,8 +6,8 @@ pub use animation::*; use std::{collections::HashMap, fs, time::Duration}; -use bevy_gltf_blueprints::{ - AllAssets, BlueprintAnimationPlayerLink, BlueprintName, GltfBlueprintsSet, SceneAnimations +use blenvy::{ + AllAssets, BlueprintAnimationPlayerLink, BlueprintEvent, BlueprintName, GltfBlueprintsSet, SceneAnimations }; use bevy::{ @@ -127,6 +127,15 @@ fn exit_game(mut app_exit_events: ResMut>) { app_exit_events.send(bevy::app::AppExit::Success); } +fn check_for_gltf_events( + mut blueprint_events: EventReader, +) +{ + for event in blueprint_events.read() { + info!("BLUEPRINT EVENT: {:?}", event); + } +} + pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { @@ -136,7 +145,7 @@ impl Plugin for GamePlugin { .register_type::() .add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) - .add_systems(Update, validate_export) + .add_systems(Update, (validate_export, check_for_gltf_events)) //.add_systems(OnEnter(AppState::CoreLoading), start_game) .add_systems(OnEnter(AppState::MenuRunning), start_game) diff --git a/testing/bevy_example/src/hierarchy_debug.rs b/testing/bevy_example/src/hierarchy_debug.rs index 6834f48..6ec6de1 100644 --- a/testing/bevy_example/src/hierarchy_debug.rs +++ b/testing/bevy_example/src/hierarchy_debug.rs @@ -1,5 +1,5 @@ use bevy::{gltf::{GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras}, prelude::*}; -use bevy_gltf_blueprints::{AllAssets, BlueprintInstanceReady}; +use blenvy::{AllAssets, BlueprintInstanceReady}; use crate::BasicTest; @@ -140,7 +140,7 @@ impl Plugin for HiearchyDebugPlugin { .add_systems(Startup, setup_hierarchy_debug) .add_systems(Update, draw_hierarchy_debug) //.add_systems(Update, check_for_gltf_extras) - + ; } } diff --git a/tools/blenvy/TODO.md b/tools/blenvy/TODO.md index 2641f3d..171808b 100644 --- a/tools/blenvy/TODO.md +++ b/tools/blenvy/TODO.md @@ -160,12 +160,13 @@ General issues: - [ ] find a solution for the new color handling - [ ] add back lighting_components - [ ] check if scene components are being deleted through our scene re-orgs in the spawn post process - +- [x] trigger events when assets are loaded, blueprints are spawned & co +- [ ] should "blueprint spawned" only be triggered after all its sub blueprints have spawned ? - [ ] simplify testing example: - [x] remove use of rapier physics (or even the whole common boilerplate ?) - [ ] remove/replace bevy editor pls with some native ui to display hierarchies - +- [ ] do a deprecation release of all bevy_gltf_xxx crates to point at the new Blenvy crate - [ ] simplify examples: - [ ] a full fledged demo (including physics & co)