Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Multirious committed Mar 27, 2024
1 parent 8c528f6 commit 311a9f0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/animation/banner_bounce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ fn animation(mut commands: Commands, asset_server: Res<AssetServer>) {
// [ square and triangle ] ====================================
.jump(
secs(0.),
ComponentDynTween::new_target_boxed(
ComponentTween::new_target_boxed(
[square, triangle],
interpolate::closure(
|sprite: &mut Sprite, value: f32| {
Expand All @@ -302,7 +302,7 @@ fn animation(mut commands: Commands, asset_server: Res<AssetServer>) {
.tween(
secs(4.)..secs(12.),
EaseFunction::ExponentialInOut,
ComponentDynTween::new_target_boxed(
ComponentTween::new_target_boxed(
[triangle, square],
interpolate::closure(
|sprite: &mut Sprite, value: f32| {
Expand Down
2 changes: 1 addition & 1 deletion examples/animation/banner_triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fn snap_rotate(
Duration::from_secs_f32(i / max * secs)
..Duration::from_secs_f32((i + 1.) / max * secs),
ease,
ComponentDynTween::new_target_boxed(
ComponentTween::new_target_boxed(
entity,
interpolate::AngleZ {
start: rev * TAU * (max - i) / max,
Expand Down
2 changes: 1 addition & 1 deletion examples/animation/thumbnail_triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn snap_rotate(
Duration::from_secs_f32(i / max * secs)
..Duration::from_secs_f32((i + 1.) / max * secs),
ease,
ComponentDynTween::new_target_boxed(
ComponentTween::new_target_boxed(
entity,
interpolate::AngleZ {
start: rev * TAU * (max - i) / max,
Expand Down
8 changes: 4 additions & 4 deletions examples/demo/click.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ fn click_spawn_circle(
.tween(
..Duration::from_secs(2),
EaseFunction::ExponentialOut,
ComponentDynTween::tweener_entity(Box::new(
ComponentTween::tweener_entity_boxed(
my_interpolate::JustTranslateTo::end(end),
)),
),
)
.tween(
..Duration::from_secs(1),
EaseFunction::BackIn,
ComponentDynTween::tweener_entity(Box::new(
ComponentTween::tweener_entity_boxed(
my_interpolate::JustScaleTo::end(Vec3::ZERO),
)),
),
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/follow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
.with_repeat_style(RepeatStyle::PingPong),
SpanTweenBundle::new(..Duration::from_secs(2)),
EaseFunction::CubicInOut,
ComponentDynTween::tweener_parent_boxed(interpolate::closure(
ComponentTween::tweener_parent_boxed(interpolate::closure(
|transform: &mut Transform, value| {
let start = 0.;
let end = TAU;
Expand Down

0 comments on commit 311a9f0

Please sign in to comment.