mirror of
https://github.com/bevyengine/bevy
synced 2024-12-24 20:13:07 +00:00
513be52505
# Objective Needing to derive `AnimationEvent` for `Event` is unnecessary, and the trigger logic coupled to it feels like we're coupling "event producer" logic with the event itself, which feels wrong. It also comes with a bunch of complexity, which is again unnecessary. We can have the flexibility of "custom animation event trigger logic" without this coupling and complexity. The current `animation_events` example is also needlessly complicated, due to it needing to work around system ordering issues. The docs describing it are also slightly wrong. We can make this all a non-issue by solving the underlying ordering problem. Related to this, we use the `bevy_animation::Animation` system set to solve PostUpdate animation order-of-operations issues. If we move this to bevy_app as part of our "core schedule", we can cut out needless `bevy_animation` crate dependencies in these instances. ## Solution - Remove `AnimationEvent`, the derive, and all other infrastructure associated with it (such as the `bevy_animation/derive` crate) - Replace all instances of `AnimationEvent` traits with `Event + Clone` - Store and use functions for custom animation trigger logic (ex: `clip.add_event_fn()`). For "normal" cases users dont need to think about this and should use the simpler `clip.add_event()` - Run the `Animation` system set _before_ updating text - Move `bevy_animation::Animation` to `bevy_app::Animation`. Remove unnecessary `bevy_animation` dependency from `bevy_ui` - Adjust `animation_events` example to use the simpler `clip.add_event` API, as the workarounds are no longer necessary This is polishing work that will land in 0.15, and I think it is simple enough and valuable enough to land in 0.15 with it, in the interest of making the feature as compelling as possible.
80 lines
1.4 KiB
Bash
80 lines
1.4 KiB
Bash
# if crate A depends on crate B, B must come before A in this list
|
|
crates=(
|
|
bevy_utils/macros
|
|
bevy_utils
|
|
bevy_ptr
|
|
bevy_macro_utils
|
|
bevy_derive
|
|
bevy_math
|
|
bevy_color
|
|
bevy_tasks
|
|
bevy_reflect/derive
|
|
bevy_reflect
|
|
bevy_ecs/macros
|
|
bevy_ecs
|
|
bevy_state/macros
|
|
bevy_state
|
|
bevy_app
|
|
bevy_time
|
|
bevy_log
|
|
bevy_asset/macros
|
|
bevy_asset
|
|
bevy_audio
|
|
bevy_core
|
|
bevy_diagnostic
|
|
bevy_hierarchy
|
|
bevy_transform
|
|
bevy_window
|
|
bevy_encase_derive
|
|
bevy_render/macros
|
|
bevy_mikktspace
|
|
bevy_image
|
|
bevy_mesh
|
|
bevy_render
|
|
bevy_core_pipeline
|
|
bevy_input
|
|
bevy_gilrs
|
|
bevy_animation
|
|
bevy_pbr
|
|
bevy_gltf
|
|
bevy_remote
|
|
bevy_scene
|
|
bevy_picking
|
|
bevy_sprite
|
|
bevy_gizmos/macros
|
|
bevy_gizmos
|
|
bevy_text
|
|
bevy_a11y
|
|
bevy_ui
|
|
bevy_winit
|
|
bevy_dev_tools
|
|
bevy_internal
|
|
bevy_dylib
|
|
)
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "You have local changes!"
|
|
exit 1
|
|
fi
|
|
|
|
pushd crates
|
|
|
|
for crate in "${crates[@]}"
|
|
do
|
|
echo "Publishing ${crate}"
|
|
cp ../LICENSE-MIT "$crate"
|
|
cp ../LICENSE-APACHE "$crate"
|
|
pushd "$crate"
|
|
git add LICENSE-MIT LICENSE-APACHE
|
|
cargo publish --no-verify --allow-dirty
|
|
popd
|
|
sleep 20
|
|
done
|
|
|
|
popd
|
|
|
|
echo "Publishing root crate"
|
|
cargo publish --allow-dirty
|
|
|
|
echo "Cleaning local state"
|
|
git reset HEAD --hard
|