chore(v0.14): upgraded all current crates, examples, testing setup etc to Bevy 0.14

This commit is contained in:
kaosat.dev 2024-07-18 18:20:40 +02:00
parent 06403153c3
commit a058659211
31 changed files with 3494 additions and 1604 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "bevy_gltf_blueprints"
version = "0.10.2"
version = "0.11.0"
authors = ["Mark 'kaosat-dev' Moissette"]
description = "Adds the ability to define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy."
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
@ -14,8 +14,8 @@ license = "MIT OR Apache-2.0"
workspace = true
[dependencies]
bevy_gltf_components = { version = "0.5", path = "../bevy_gltf_components" }
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
bevy_gltf_components = { version = "0.6", path = "../bevy_gltf_components" }
bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] }
bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] }

View File

@ -3,7 +3,9 @@
[![License](https://img.shields.io/crates/l/bevy_gltf_blueprints)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_gltf_blueprints/License.md)
[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
# bevy_gltf_blueprints
# bevy_gltf_blueprints (deprecated in favor of Blenvy)
> bevy_gltf_blueprints has been deprecated in favor of its successor [Blenvy](https://crates.io/crates/blenvy), part of the [Blenvy project](https://github.com/kaosat-dev/Blenvy). No further development or maintenance will be done for Bevy bevy_gltf_blueprints. See [#194](https://github.com/kaosat-dev/Blenvy/issues/194) for background.
Built on [bevy_gltf_components](https://crates.io/crates/bevy_gltf_components) this crate adds the ability to define Blueprints/Prefabs for [Bevy](https://bevyengine.org/) inside gltf files and spawn them in Bevy.
@ -27,8 +29,8 @@ Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
bevy="0.13"
bevy_gltf_blueprints = { version = "0.10"}
bevy="0.14"
bevy_gltf_blueprints = { version = "0.11.0"}
```
@ -66,7 +68,7 @@ fn spawn_blueprint(
Add the following to your `[dependencies]` section in `Cargo.toml`:
```toml
bevy_gltf_blueprints = "0.10"
bevy_gltf_blueprints = "0.11.0"
```
Or use `cargo add`:
@ -344,6 +346,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be
Compatibility of `bevy_gltf_blueprints` versions:
| `bevy_gltf_blueprints` | `bevy` |
| :-- | :-- |
| `0.11` | `0.14` |
| `0.9 - 0.10` | `0.13` |
| `0.3 - 0.8` | `0.12` |
| `0.1 - 0.2` | `0.11` |

View File

@ -6,6 +6,8 @@ use bevy::utils::HashMap;
/// storage for animations for a given entity (hierarchy), essentially a clone of gltf's `named_animations`
pub struct Animations {
pub named_animations: HashMap<String, Handle<AnimationClip>>,
pub named_indices: HashMap<String, AnimationNodeIndex>,
pub graph: Handle<AnimationGraph>,
}
#[derive(Component, Debug)]

View File

@ -1,5 +1,4 @@
use bevy::ecs::system::Command;
use bevy::prelude::*;
use bevy::{ecs::world::Command, prelude::*};
use std::any::TypeId;
// originally based https://github.com/bevyengine/bevy/issues/1515,

View File

@ -172,10 +172,10 @@ pub(crate) fn materials_inject2(
let mat_gltf = assets_gltf
.get(model_handle.id())
.expect("material should have been preloaded");
if mat_gltf.named_materials.contains_key(material_name) {
if mat_gltf.named_materials.contains_key(material_name as &str) {
let material = mat_gltf
.named_materials
.get(material_name)
.get(material_name as &str)
.expect("this material should have been loaded");
blueprints_config
.material_library_cache

View File

@ -214,6 +214,7 @@ pub(crate) fn spawn_from_blueprints(
mut game_world: Query<Entity, With<GameWorldTag>>,
assets_gltf: Res<Assets<Gltf>>,
mut graphs: ResMut<Assets<AnimationGraph>>,
asset_server: Res<AssetServer>,
blueprints_config: Res<BluePrintsConfig>,
@ -273,6 +274,18 @@ pub(crate) fn spawn_from_blueprints(
original_children.push(*child);
}
}
let mut graph = AnimationGraph::new();
let mut named_animations: HashMap<String, Handle<AnimationClip>> = HashMap::new();
let mut named_indices: HashMap<String, AnimationNodeIndex> = HashMap::new();
for (key, clip) in gltf.named_animations.iter() {
named_animations.insert(key.to_string(), clip.clone());
let animation_index = graph.add_clip(clip.clone(), 1.0, graph.root);
named_indices.insert(key.to_string(), animation_index);
}
let graph = graphs.add(graph);
commands.entity(entity).insert((
SceneBundle {
scene: scene.clone(),
@ -280,7 +293,9 @@ pub(crate) fn spawn_from_blueprints(
..Default::default()
},
Animations {
named_animations: gltf.named_animations.clone(),
named_animations,
named_indices,
graph
},
Spawned,
OriginalChildren(original_children),

View File

@ -1,6 +1,6 @@
[package]
name = "bevy_gltf_components"
version = "0.5.1"
version = "0.6.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"
@ -14,9 +14,9 @@ license = "MIT OR Apache-2.0"
workspace = true
[dependencies]
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
serde = "1.0.188"
ron = "0.8.1"
[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] }
bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] }

View File

@ -4,7 +4,9 @@
[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
# bevy_gltf_components
# bevy_gltf_components (deprecated in favor of Blenvy)
> bevy_gltf_components has been deprecated in favor of its successor [Blenvy](https://crates.io/crates/blenvy), part of the [Blenvy project](https://github.com/kaosat-dev/Blenvy). No further development or maintenance will be done for Bevy bevy_gltf_components. See [#194](https://github.com/kaosat-dev/Blenvy/issues/194) for background.
This crate allows you to define [Bevy](https://bevyengine.org/) components direclty inside gltf files and instanciate the components on the Bevy side.
@ -23,8 +25,8 @@ Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
bevy="0.13"
bevy_gltf_components = { version = "0.5"}
bevy="0.14"
bevy_gltf_components = { version = "0.6"}
```
@ -60,7 +62,7 @@ bevy_gltf_components = { version = "0.5"}
Add the following to your `[dependencies]` section in `Cargo.toml`:
```toml
bevy_gltf_components = "0.5"
bevy_gltf_components = "0.6"
```
Or use `cargo add`:
@ -127,6 +129,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be
Compatibility of `bevy_gltf_components` versions:
| `bevy_gltf_components` | `bevy` |
| :-- | :-- |
| `0.6` | `0.14` |
| `0.5` | `0.13` |
| `0.2 - 0.4` | `0.12` |
| `0.1` | `0.11` |

View File

@ -1,10 +1,5 @@
use bevy::pbr::DirectionalLightShadowMap;
use bevy::prelude::*;
use bevy::render::render_asset::RenderAssetUsages;
use bevy::render::render_resource::{
Extent3d, TextureDimension, TextureFormat, TextureViewDescriptor, TextureViewDimension,
};
use std::iter;
use crate::GltfComponentsSet;
@ -56,17 +51,23 @@ fn process_lights(
for (mut light, blender_light_shadows) in directional_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
}
}
for (mut light, blender_light_shadows) in spot_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
}
}
for (mut light, blender_light_shadows) in point_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
}
}
}
@ -83,66 +84,14 @@ fn process_shadowmap(
}
fn process_background_shader(
background_shaders: Query<Ref<BlenderBackgroundShader>>,
cameras: Query<(Entity, Ref<Camera3d>)>,
mut images: ResMut<Assets<Image>>,
background_shaders: Query<&BlenderBackgroundShader, Added<BlenderBackgroundShader>>,
mut commands: Commands,
mut env_map_handle: Local<Option<Handle<Image>>>,
) {
let Ok(background_shader) = background_shaders.get_single() else {
return;
};
let env_map_handle = env_map_handle.get_or_insert_with(|| {
let size = Extent3d {
width: 1,
height: 6,
depth_or_array_layers: 1,
};
let dimension = TextureDimension::D2;
const SIDES_PER_CUBE: usize = 6;
let data: Vec<_> = iter::repeat(background_shader.color.as_rgba_u8())
.take(SIDES_PER_CUBE)
.flatten()
.collect();
let format = TextureFormat::Rgba8UnormSrgb;
let asset_usage = RenderAssetUsages::RENDER_WORLD;
let mut image = Image::new(size, dimension, data, format, asset_usage);
// Source: https://github.com/bevyengine/bevy/blob/85b488b73d6f6e75690962fba67a144d9beb6b88/examples/3d/skybox.rs#L152-L160
image.reinterpret_stacked_2d_as_array(image.height() / image.width());
image.texture_view_descriptor = Some(TextureViewDescriptor {
dimension: Some(TextureViewDimension::Cube),
..default()
});
images.add(image)
});
// Don't need the handle to be &mut
let env_map_handle = &*env_map_handle;
if background_shader.is_added() {
// We're using an environment map, so we don't need the ambient light
commands.remove_resource::<AmbientLight>();
}
let is_bg_outdated = background_shader.is_changed();
if is_bg_outdated {
let color = background_shader.color * background_shader.strength;
commands.insert_resource(ClearColor(color));
}
let camera_entities = cameras
.iter()
.filter_map(|(entity, cam)| (is_bg_outdated || cam.is_changed()).then_some(entity));
for camera_entity in camera_entities {
// See https://github.com/KhronosGroup/glTF-Blender-IO/blob/8573cc0dfb612091bfc1bcf6df55c18a44b9668a/addons/io_scene_gltf2/blender/com/gltf2_blender_conversion.py#L19
const PBR_WATTS_TO_LUMENS: f32 = 683.0;
commands.entity(camera_entity).insert(EnvironmentMapLight {
diffuse_map: env_map_handle.clone(),
specular_map: env_map_handle.clone(),
intensity: background_shader.strength * PBR_WATTS_TO_LUMENS,
for background_shader in background_shaders.iter() {
commands.insert_resource(AmbientLight {
color: background_shader.color,
// Just a guess, see <https://github.com/bevyengine/bevy/issues/12280>
brightness: background_shader.strength * 400.0,
});
}
}

View File

@ -1,5 +1,5 @@
use bevy::log::{debug, warn};
use bevy::reflect::serde::UntypedReflectDeserializer;
use bevy::reflect::serde::ReflectDeserializer;
use bevy::reflect::{Reflect, TypeInfo, TypeRegistration, TypeRegistry};
use bevy::utils::HashMap;
use ron::Value;
@ -112,7 +112,7 @@ pub fn ronstring_to_reflect_component(
debug!("component data ron string {}", ron_string);
let mut deserializer = ron::Deserializer::from_str(ron_string.as_str())
.expect("deserialzer should have been generated from string");
let reflect_deserializer = UntypedReflectDeserializer::new(type_registry);
let reflect_deserializer = ReflectDeserializer::new(type_registry);
let component = reflect_deserializer
.deserialize(&mut deserializer)
.unwrap_or_else(|_| {

View File

@ -1,6 +1,6 @@
[package]
name = "bevy_gltf_save_load"
version = "0.4.1"
version = "0.5.0"
authors = ["Mark 'kaosat-dev' Moissette"]
description = "Save & load your bevy games"
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
@ -14,8 +14,8 @@ license = "MIT OR Apache-2.0"
workspace = true
[dependencies]
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
bevy_gltf_blueprints = { version = "0.10", path = "../bevy_gltf_blueprints" }
bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
bevy_gltf_blueprints = { version = "0.11", path = "../bevy_gltf_blueprints" }
[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] }
bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] }

View File

@ -3,7 +3,9 @@
[![License](https://img.shields.io/crates/l/bevy_gltf_save_load)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_gltf_save_load/License.md)
[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
# bevy_gltf_save_load
# bevy_gltf_save_load (deprecated in favor of Blenvy)
> bevy_gltf_save_load has been deprecated in favor of its successor [Blenvy](https://crates.io/crates/blenvy), part of the [Blenvy project](https://github.com/kaosat-dev/Blenvy). No further development or maintenance will be done for Bevy bevy_gltf_save_load. See [#194](https://github.com/kaosat-dev/Blenvy/issues/194) for background.
Built upon [bevy_gltf_blueprints](https://crates.io/crates/bevy_gltf_blueprints) this crate adds the ability to easilly **save** and **load** your game worlds for [Bevy](https://bevyengine.org/) .
@ -34,9 +36,9 @@ Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
bevy="0.13"
bevy_gltf_save_load = "0.4"
bevy_gltf_blueprints = "0.10" // also needed
bevy="0.14"
bevy_gltf_save_load = "0.5"
bevy_gltf_blueprints = "0.11" // also needed
```
```rust no_run
@ -298,6 +300,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be
Compatibility of `bevy_gltf_save_load` versions:
| `bevy_gltf_save_load` | `bevy` |
| :-- | :-- |
| `0.5 ` | `0.14` |
| `0.4 ` | `0.13` |
| `0.1 -0.3` | `0.12` |
| branch `main` | `0.12` |

View File

@ -147,7 +147,7 @@ pub(crate) fn save_game(world: &mut World) {
// dyn_scene.resources.append(&mut dyn_scene_root.resources);
let serialized_scene = dyn_scene
.serialize_ron(world.resource::<AppTypeRegistry>())
.serialize(&world.resource::<AppTypeRegistry>().read())
.unwrap();
let save_path = Path::new("assets")

View File

@ -1,6 +1,6 @@
[package]
name = "bevy_registry_export"
version = "0.3.1"
version = "0.4.0"
authors = ["Mark 'kaosat-dev' Moissette", "Pascal 'Killercup' Hertleif"]
description = "Allows you to create a Json export of all your components/ registered types of your Bevy app/game"
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
@ -11,11 +11,11 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", default-features = false, features = ["bevy_scene"] }
bevy_reflect = { version = "0.13", default-features = false }
bevy_app = { version = "0.13", default-features = false, features = ["bevy_reflect"] }
bevy_ecs = { version = "0.13", default-features = false, features = ["bevy_reflect"] }
bevy = { version = "0.14", default-features = false, features = ["bevy_scene"] }
bevy_reflect = { version = "0.14", default-features = false }
bevy_app = { version = "0.14", default-features = false, features = ["bevy_reflect"] }
bevy_ecs = { version = "0.14", default-features = false, features = ["bevy_reflect"] }
serde_json = "1.0.108"
[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = ["dynamic_linking"] }
bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] }

View File

@ -3,7 +3,10 @@
[![License](https://img.shields.io/crates/l/bevy_registry_export)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/crates/bevy_registry_export/License.md)
[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
# bevy_registry_export
# bevy_registry_export (deprecated in favor of Blenvy)
> bevy_registry_export has been deprecated in favor of its successor [Blenvy](https://crates.io/crates/blenvy), part of the [Blenvy project](https://github.com/kaosat-dev/Blenvy). No further development or maintenance will be done for Bevy bevy_registry_export. See [#194](https://github.com/kaosat-dev/Blenvy/issues/194) for background.
This plugin allows you to create a Json export of all your components/ registered types.
Its main use case is as a backbone for the [```bevy_components``` Blender add-on](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/bevy_components), that allows you to add & edit components directly in Blender, using the actual type definitions from Bevy
@ -17,8 +20,8 @@ Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
bevy="0.13"
bevy_registry_export = "0.3"
bevy="0.14"
bevy_registry_export = "0.4"
```
```rust no_run
@ -44,7 +47,7 @@ take a look at the [example](https://github.com/kaosat-dev/Blender_bevy_componen
Add the following to your `[dependencies]` section in `Cargo.toml`:
```toml
bevy_registry_export = "0.3"
bevy_registry_export = "0.4"
```
@ -112,6 +115,7 @@ The main branch is compatible with the latest Bevy release, while the branch `be
Compatibility of `bevy_registry_export` versions:
| `bevy_registry_export` | `bevy` | `bevy_components (Blender add-on)` |
| :-- | :-- |:-- |
| `0.4 ` | `0.14` | `0.3` |
| `0.3 ` | `0.13` | `0.3` |
| `0.2 ` | `0.12` | `0.3` |
| `0.1 ` | `0.12` | `0.1 -0.2` |

View File

@ -5,8 +5,8 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

View File

@ -92,7 +92,7 @@ pub fn animation_change_on_proximity_foxes(
players: Query<&GlobalTransform, With<Player>>,
animated_foxes: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations), With<Fox>>,
mut animation_players: Query<&mut AnimationPlayer>,
mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>,
) {
for player_transforms in players.iter() {
for (fox_tranforms, link, animations) in animated_foxes.iter() {
@ -108,11 +108,12 @@ pub fn animation_change_on_proximity_foxes(
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(
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),
@ -128,7 +129,7 @@ pub fn animation_change_on_proximity_robots(
players: Query<&GlobalTransform, With<Player>>,
animated_robots: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations), With<Robot>>,
mut animation_players: Query<&mut AnimationPlayer>,
mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>,
) {
for player_transforms in players.iter() {
for (robot_tranforms, link, animations) in animated_robots.iter() {
@ -146,11 +147,12 @@ pub fn animation_change_on_proximity_robots(
}
// 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(
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),
@ -165,7 +167,7 @@ pub fn animation_control(
animated_enemies: Query<(&AnimationPlayerLink, &Animations), With<Robot>>,
animated_foxes: Query<(&AnimationPlayerLink, &Animations), With<Fox>>,
mut animation_players: Query<&mut AnimationPlayer>,
mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>,
keycode: Res<ButtonInput<KeyCode>>,
// mut entities_with_animations : Query<(&mut AnimationPlayer, &mut Animations)>,
@ -173,12 +175,13 @@ pub fn animation_control(
// robots
if keycode.just_pressed(KeyCode::KeyB) {
for (link, animations) in animated_enemies.iter() {
let mut animation_player = animation_players.get_mut(link.0).unwrap();
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
let anim_name = "Scan";
animation_player
.play_with_transition(
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),
@ -191,12 +194,13 @@ pub fn animation_control(
// foxes
if keycode.just_pressed(KeyCode::KeyW) {
for (link, animations) in animated_foxes.iter() {
let mut animation_player = animation_players.get_mut(link.0).unwrap();
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
let anim_name = "Walk";
animation_player
.play_with_transition(
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),
@ -208,12 +212,13 @@ pub fn animation_control(
if keycode.just_pressed(KeyCode::KeyX) {
for (link, animations) in animated_foxes.iter() {
let mut animation_player = animation_players.get_mut(link.0).unwrap();
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
let anim_name = "Run";
animation_player
.play_with_transition(
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),
@ -225,12 +230,13 @@ pub fn animation_control(
if keycode.just_pressed(KeyCode::KeyC) {
for (link, animations) in animated_foxes.iter() {
let mut animation_player = animation_players.get_mut(link.0).unwrap();
let (mut animation_player, mut animation_transitions) = animation_players.get_mut(link.0).unwrap();
let anim_name = "Survey";
animation_player
.play_with_transition(
animation_transitions
.play(
&mut animation_player,
animations
.named_animations
.named_indices
.get(anim_name)
.expect("animation name should be in the list")
.clone(),

View File

@ -5,8 +5,8 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

View File

@ -5,8 +5,8 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_worlflow_examples_common_xpbd = { path = "../../common_xpbd" }
bevy_xpbd_3d = "0.4"
bevy_xpbd_3d = "0.5"
rand = "0.8.5"

View File

@ -5,8 +5,8 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

View File

@ -5,8 +5,8 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

View File

@ -5,6 +5,6 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_components = { path = "../../../crates/bevy_gltf_components" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }

View File

@ -5,12 +5,12 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_gltf_save_load = { path = "../../../crates/bevy_gltf_save_load" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
serde_json = "1.0.108"
serde = "1.0.193"
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

View File

@ -5,9 +5,9 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" }
bevy_registry_export = { path = "../../../crates/bevy_registry_export" }
bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" }
bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
rand = "0.8.5"

File diff suppressed because it is too large Load Diff

View File

@ -12,10 +12,10 @@ default = ["blueprints", "physics_rapier"]
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true }
bevy_rapier3d = { version = "0.25", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"], optional = true }
bevy_xpbd_3d = { version = "0.4", optional = true }
bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] }
bevy_editor_pls = { version = "0.8" }
bevy_rapier3d = { version = "0.27", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"], optional = true }
bevy_xpbd_3d = { version = "0.5", optional = true }
bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] }
#bevy_editor_pls = { version = "0.8" }
rand = "0.8.5"

View File

@ -11,7 +11,7 @@ pub mod game;
pub use game::*;
use bevy::prelude::*;
use bevy_editor_pls::prelude::*;
//use bevy_editor_pls::prelude::*;
pub struct CommonPlugin;
impl Plugin for CommonPlugin {
@ -21,7 +21,7 @@ impl Plugin for CommonPlugin {
AssetsPlugin,
CorePlugin,
GamePlugin,
EditorPlugin::default(),
//EditorPlugin::default(),
));
}
}

View File

@ -10,10 +10,10 @@ default = ["blueprints"]
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_worlflow_examples_common = { path = "../common" }
bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true }
bevy_rapier3d = { version = "0.25", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] }
bevy_editor_pls = { version = "0.8" }
bevy_rapier3d = { version = "0.27", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] }
#bevy_editor_pls = { version = "0.8" }
rand = "0.8.5"

View File

@ -10,10 +10,10 @@ default = ["blueprints"]
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
bevy_gltf_worlflow_examples_common = { path = "../common" }
bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true }
bevy_xpbd_3d = { version = "0.4" }
bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] }
bevy_editor_pls = { version = "0.8" }
bevy_xpbd_3d = { version = "0.5" }
bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] }
#bevy_editor_pls = { version = "0.8" }
rand = "0.8.5"

View File

@ -5,12 +5,12 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.13", features = ["dynamic_linking"] }
bevy = { version = "0.14", features = ["dynamic_linking"] }
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_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_asset_loader = { version = "0.20", features = ["standard_dynamic_assets"] }
bevy_editor_pls = { version = "0.8" }
bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] }
bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] }
#bevy_editor_pls = { version = "0.8" }
rand = "0.8.5"

View File

@ -94,7 +94,7 @@ fn generate_screenshot(
}
fn exit_game(mut app_exit_events: ResMut<Events<bevy::app::AppExit>>) {
app_exit_events.send(bevy::app::AppExit);
app_exit_events.send(AppExit::Success);
}
pub struct GamePlugin;