Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Hanabi to patched 0.11 #318

Merged
merged 4 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ leafwing-input-manager = { version = "0.13", features = ["egui"] }
bevy_dolly = "0.0.3"
bevy_mod_sysfail = "7"
bevy_editor_pls = { version = "0.8.1", optional = true }
bevy_hanabi = { version = "0.10", default-features = false, features = ["3d"] } # Not on 0.11 yet because of Hanabi bugs ("Failed to find update pipeline")
bevy_hanabi = { version = "0.11", default-features = false, features = ["3d"] }
bevy_yarnspinner = "0.2"
bevy_yarnspinner_example_dialogue_view = "0.2.1"
bevy-tnua-xpbd3d = "0.4"
Expand Down Expand Up @@ -89,3 +89,7 @@ egui_dock = { git = "https://github.com/bash/egui_dock.git", branch = "backport-
# These patches mainly remove strum and are included in bevy_yarnspinner 0.3.0-rc
bevy_yarnspinner = { git = "https://github.com/YarnSpinnerTool/YarnSpinner-Rust.git", rev = "c6ab0c9e8c3a5a98f741aaae6adef1cfc272db30" }
bevy_yarnspinner_example_dialogue_view = { git = "https://github.com/YarnSpinnerTool/YarnSpinner-Rust.git", rev = "c6ab0c9e8c3a5a98f741aaae6adef1cfc272db30" }

# Bug fixes
bevy_hanabi = { git = "https://github.com/djeedai/bevy_hanabi/", rev = "b9a98bdf51be07f8127d2f16b68f1eb86259242f" }

96 changes: 82 additions & 14 deletions assets/scenes/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -4020,11 +4020,6 @@
"type": {
"$ref": "#/$defs/bevy_asset::handle::Handle<bevy_hanabi::asset::EffectAsset>"
}
},
"spawner": {
"type": {
"$ref": "#/$defs/core::option::Option<bevy_hanabi::spawn::Spawner>"
}
}
},
"required": [
Expand All @@ -4045,9 +4040,9 @@
"$ref": "#/$defs/bevy_hanabi::asset::AlphaMode"
}
},
"capacity": {
"capacities": {
"type": {
"$ref": "#/$defs/u32"
"$ref": "#/$defs/alloc::vec::Vec<u32>"
}
},
"module": {
Expand All @@ -4065,11 +4060,6 @@
"$ref": "#/$defs/alloc::string::String"
}
},
"properties": {
"type": {
"$ref": "#/$defs/alloc::vec::Vec<bevy_hanabi::properties::Property>"
}
},
"simulation_condition": {
"type": {
"$ref": "#/$defs/bevy_hanabi::asset::SimulationCondition"
Expand All @@ -4093,12 +4083,11 @@
},
"required": [
"name",
"capacity",
"capacities",
"spawner",
"z_layer_2d",
"simulation_space",
"simulation_condition",
"properties",
"motion_integration",
"module",
"alpha_mode"
Expand Down Expand Up @@ -9289,6 +9278,85 @@
"type": "object",
"typeInfo": "Struct"
},
"bevy_time::time::Time<bevy_hanabi::time::EffectSimulation>": {
"additionalProperties": false,
"isComponent": false,
"isResource": true,
"properties": {
"context": {
"type": {
"$ref": "#/$defs/bevy_hanabi::time::EffectSimulation"
}
},
"delta": {
"type": {
"$ref": "#/$defs/bevy_utils::Duration"
}
},
"delta_seconds": {
"type": {
"$ref": "#/$defs/f32"
}
},
"delta_seconds_f64": {
"type": {
"$ref": "#/$defs/f64"
}
},
"elapsed": {
"type": {
"$ref": "#/$defs/bevy_utils::Duration"
}
},
"elapsed_seconds": {
"type": {
"$ref": "#/$defs/f32"
}
},
"elapsed_seconds_f64": {
"type": {
"$ref": "#/$defs/f64"
}
},
"elapsed_seconds_wrapped": {
"type": {
"$ref": "#/$defs/f32"
}
},
"elapsed_seconds_wrapped_f64": {
"type": {
"$ref": "#/$defs/f64"
}
},
"elapsed_wrapped": {
"type": {
"$ref": "#/$defs/bevy_utils::Duration"
}
},
"wrap_period": {
"type": {
"$ref": "#/$defs/bevy_utils::Duration"
}
}
},
"required": [
"context",
"wrap_period",
"delta",
"delta_seconds",
"delta_seconds_f64",
"elapsed",
"elapsed_seconds",
"elapsed_seconds_f64",
"elapsed_wrapped",
"elapsed_seconds_wrapped",
"elapsed_seconds_wrapped_f64"
],
"short_name": "Time<EffectSimulation>",
"title": "bevy_time::time::Time<bevy_hanabi::time::EffectSimulation>",
"type": "object",
"typeInfo": "Struct"
},
"bevy_time::time::Time<bevy_time::fixed::Fixed>": {
"additionalProperties": false,
"isComponent": false,
Expand Down
2 changes: 1 addition & 1 deletion src/level_instantiation/blender_workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_registry_export::ExportRegistryPlugin;
/// The basic workflow is as follows:
/// - Create a scene in Blender
/// - Add marker components to objects via the Bevy Components Addon, e.g. `ColliderMarker`
/// (If using an old version of the plugin, make sure to turn the legacy mode *off*)
/// (If using an old version of the plugin, make sure to turn the legacy mode *off*)
/// - Export the scene as a GLTF
/// - Load the GLTF in Bevy
/// - React to objects being spawned with a marker component via a query like `Query<Entity, Added<ColliderMarker>>`
Expand Down
4 changes: 2 additions & 2 deletions src/movement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub(crate) mod physics;
/// It is further split into the following sub-plugins:
/// - [`physics::plugin`]: Instantiates the rapier integration
/// - [`character_controller::plugin`]: Handles kinematic character controller movement. A "character" in
/// this sense is anything that behaves in a not-quite completely physical way, like a player, an npc, an elevator, a moving platform, etc.
/// Contrast this with pure rigidbodies like a ball, a crate, etc.
/// this sense is anything that behaves in a not-quite completely physical way, like a player, an npc, an elevator, a moving platform, etc.
/// Contrast this with pure rigidbodies like a ball, a crate, etc.
/// - [`navigation::plugin`]: Handles npc pathfinding via bevy_pathmesh integration.
pub(super) fn plugin(app: &mut App) {
app.add_plugins((
Expand Down
2 changes: 1 addition & 1 deletion src/particles/creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn create_sprinting_effect(effects: &mut Assets<EffectAsset>) -> Handle<EffectAs

effects.add(
EffectAsset::new(
100,
vec![100],
Spawner::rate(10.0.into()).with_starts_active(false),
module,
)
Expand Down
2 changes: 1 addition & 1 deletion src/player_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub(crate) mod player_embodiment;
/// - [`actions::plugin`]: Handles player input such as mouse and keyboard and neatly packs it into a [`leafwing_input_manager::Actionlike`].
/// - [`camera::plugin`]: Handles camera movement.
/// - [`player_embodiment::plugin`]: Tells the components from [`super::movement::plugin`] about the desired [`actions::PlayerAction`]s.
/// Also handles other systems that change how the player is physically represented in the world.
/// Also handles other systems that change how the player is physically represented in the world.
pub(super) fn plugin(app: &mut App) {
app.add_plugins((actions::plugin, camera::plugin, player_embodiment::plugin));
}