Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6d2df17
feat: adds event traversal for tween events
Just-Helpful Oct 23, 2026
1e15a51
feat: adds entity observers to examples
Just-Helpful Oct 23, 2026
05b8bf8
tweak: renames event emitter marker
Just-Helpful Oct 24, 2026
c852465
revert: removes traversal ahead of splitting event propagation
Just-Helpful Oct 24, 2026
2fdda83
feat: adds new markers for different event types
Just-Helpful Oct 24, 2026
e430357
chore: removes unused imports
Just-Helpful Oct 24, 2026
ec977a9
feat: adds listener systems for other event types
Just-Helpful Oct 24, 2026
b3d4dee
tweak: updates combinator names and descriptions
Just-Helpful Oct 24, 2026
0d62735
feat: adds new event systems to plugins and exports
Just-Helpful Oct 24, 2026
41a1f6b
feat: adds combinators for new event emitter types
Just-Helpful Oct 24, 2026
7c9c6d1
fix: corrects event combinators used in examples
Just-Helpful Oct 24, 2026
67464d4
tweak: extracts common dispatch logic
Just-Helpful Oct 24, 2026
b31fe04
fix: corrects marker component used for dispatching root events
Just-Helpful Oct 24, 2026
497c427
docs: updates function comments to avoid confusion...
Just-Helpful Oct 24, 2026
d5cb889
feat: adds cover all combinator for dispatching data
Just-Helpful Oct 24, 2026
e9f05ac
tweak: extracts common event creation logic
Just-Helpful Oct 24, 2026
5ae4741
docs: formats doc comment
Just-Helpful Oct 24, 2026
56e3100
tweak: renames examples
Just-Helpful Oct 24, 2026
ae4bd26
docs: updates module doc comments for tween events
Just-Helpful Oct 24, 2026
52fc936
docs: updates doc comments
Just-Helpful Oct 24, 2026
da2469a
docs: updates doc comments
Just-Helpful Oct 24, 2026
9dbc0ad
docs: corrects system links
Just-Helpful Oct 24, 2026
6217758
docs: corrects system links
Just-Helpful Oct 24, 2026
05cf122
tweak: reorders event types for consistency
Just-Helpful Oct 24, 2026
8034ae4
tweak: removes `self` event combinators
Just-Helpful Oct 25, 2026
abcf023
tweak: removes other self event handler logic
Just-Helpful Oct 25, 2026
0a460d0
tweak: renames `root_event` -> `event`
Just-Helpful Oct 25, 2026
d6ce9fc
tweak: prefers additional param for dispatch method
Just-Helpful Oct 25, 2026
97086db
Update src/tween_event.rs
Just-Helpful Oct 25, 2026
a737a62
tweak: makes internals of `TweenSystemData` private
Just-Helpful Oct 25, 2026
1224a35
tweak: handles animation events without a root.
Just-Helpful Oct 25, 2026
7c27e39
fix: avoids a hard `Data: Debug` requirement for event system warnings
Just-Helpful Oct 25, 2026
0626010
tweak: adds info on the data type in missing root warn messages
Just-Helpful Oct 25, 2026
4939c24
Merge branch 'Multirious:main' into main
Just-Helpful Oct 25, 2026
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ path = "examples/demo/hold.rs"
required-features = ["bevy_sprite", "bevy_asset"]

[[example]]
name = "event"
path = "examples/demo/event.rs"
name = "message"
path = "examples/demo/message.rs"
required-features = ["bevy_sprite", "bevy_asset"]

[[example]]
name = "entity_event"
path = "examples/demo/entity_event.rs"
name = "events"
path = "examples/demo/events.rs"

[[example]]
name = "sprite_sheet"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ https://github.com/Multirious/bevy_tween/assets/77918086/33a297a6-19f2-4146-a906

---

`cargo run --example event -F bevy/bevy_winit`<br>
`cargo run --example message -F bevy/bevy_winit`<br>
Showcasing the tween event feature.<br>

https://github.com/Multirious/bevy_tween/assets/77918086/9507c467-6428-4aed-bd00-511f05e6e951
Expand Down
19 changes: 12 additions & 7 deletions examples/demo/entity_event.rs → examples/demo/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
.add_plugins((MinimalPlugins, DefaultTweenPlugins::default()))
.add_systems(Startup, setup)
.add_observer(|trigger: On<TweenEvent<&'static str>>| {
println!("TweenEvent: {}", trigger.data)
println!("TweenEvent on {}: {}", trigger.entity, trigger.data)
})
.add_observer(|trigger: On<TimeRunnerEnded>| {
if trigger.is_completed() {
Expand All @@ -28,10 +28,15 @@ fn setup(mut commands: Commands) {
.repeat(Repeat::times(5))
.insert(forward(Duration::from_secs_f32(0.5)));

commands.animation().insert(sequence((
forward(Duration::from_secs_f32(3.)),
event("tween"),
forward(Duration::from_secs_f32(0.5)),
event("event"),
)));
commands
.animation()
.insert(sequence((
forward(Duration::from_secs_f32(3.)),
event("tween"),
forward(Duration::from_secs_f32(0.5)),
event("event"),
)))
.observe(|trigger: On<TweenEvent<&'static str>>| {
println!("TweenEvent on root: {}", trigger.data)
});
}
6 changes: 3 additions & 3 deletions examples/demo/event.rs → examples/demo/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
.animation()
.repeat(Repeat::Infinitely)
.insert(sequence((
event("bump"),
message("bump"),
tween(
secs(1.),
EaseKind::ExponentialIn,
Expand All @@ -76,8 +76,8 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
),
),
backward(secs(0.2)),
event_for(secs(0.2), "small_boom"),
event("boom"),
message_for(secs(0.2), "small_boom"),
message("boom"),
tween(
secs(1.),
EaseKind::CircularOut,
Expand Down
Loading
Loading