5
5
[ ![ Crate] ( https://img.shields.io/crates/v/bevy_tweening.svg )] ( https://crates.io/crates/bevy_tweening )
6
6
[ ![ Build Status] ( https://github.com/djeedai/bevy_tweening/actions/workflows/ci.yaml/badge.svg )] ( https://github.com/djeedai/bevy_tweening/actions/workflows/ci.yaml )
7
7
[ ![ Coverage Status] ( https://coveralls.io/repos/github/djeedai/bevy_tweening/badge.svg?branch=main&kill_cache=1 )] ( https://coveralls.io/github/djeedai/bevy_tweening?branch=main )
8
- [ ![ Bevy tracking] ( https://img.shields.io/badge/Bevy%20tracking-v0.15 -lightblue )] ( https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking )
8
+ [ ![ Bevy tracking] ( https://img.shields.io/badge/Bevy%20tracking-v0.16 -lightblue )] ( https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking )
9
9
10
10
Tweening animation plugin for the Bevy game engine.
11
11
@@ -141,19 +141,19 @@ The naming scheme for predefined lenses is `"<TargetName><FieldName>Lens"`, wher
141
141
142
142
| Target Component | Animated Field | Lens | Feature |
143
143
| ---| ---| ---| ---|
144
- | [ ` Transform ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html ) | [ ` translation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.translation ) | [ ` TransformPositionLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformPositionLens.html ) | |
145
- | | [ ` rotation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (` Quat ` )¹ | [ ` TransformRotationLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformRotationLens.html ) | |
146
- | | [ ` rotation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateXLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformRotateXLens.html ) | |
147
- | | [ ` rotation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateYLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformRotateYLens.html ) | |
148
- | | [ ` rotation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateZLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformRotateZLens.html ) | |
149
- | | [ ` rotation ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateAxisLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformRotateAxisLens.html ) | |
150
- | | [ ` scale ` ] ( https://docs.rs/bevy/0.15.0 /bevy/transform/components/struct.Transform.html#structfield.scale ) | [ ` TransformScaleLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TransformScaleLens.html ) | |
151
- | [ ` Sprite ` ] ( https://docs.rs/bevy/0.15.0 /bevy/sprite/struct.Sprite.html ) | [ ` color ` ] ( https://docs.rs/bevy/0.15.0 /bevy/sprite/struct.Sprite.html#structfield.color ) | [ ` SpriteColorLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.SpriteColorLens.html ) | ` bevy_sprite ` |
152
- | [ ` Node ` ] ( https://docs.rs/bevy/0.15.0 /bevy/ui/struct.Node.html ) | [ ` position ` ] ( https://docs.rs/bevy/0.15.0 /bevy/ui/struct.Node.html ) | [ ` UiPositionLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.UiPositionLens.html ) | ` bevy_ui ` |
153
- | [ ` BackgroundColor ` ] ( https://docs.rs/bevy/0.15.0 /bevy/ui/struct.BackgroundColor.html ) | | [ ` UiBackgroundColorLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.UiBackgroundColorLens.html ) | ` bevy_ui ` |
154
- | [ ` TextColor ` ] ( https://docs.rs/bevy/0.15.0 /bevy/text/struct.TextColor.html ) | | [ ` TextColorLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.TextColorLens.html ) | ` bevy_text ` |
155
-
156
- There are two ways to interpolate rotations. See the [ comparison of rotation lenses] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/index.html#rotations ) for details:
144
+ | [ ` Transform ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html ) | [ ` translation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.translation ) | [ ` TransformPositionLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformPositionLens.html ) | |
145
+ | | [ ` rotation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (` Quat ` )¹ | [ ` TransformRotationLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformRotationLens.html ) | |
146
+ | | [ ` rotation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateXLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformRotateXLens.html ) | |
147
+ | | [ ` rotation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateYLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformRotateYLens.html ) | |
148
+ | | [ ` rotation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateZLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformRotateZLens.html ) | |
149
+ | | [ ` rotation ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.rotation ) (angle)² | [ ` TransformRotateAxisLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformRotateAxisLens.html ) | |
150
+ | | [ ` scale ` ] ( https://docs.rs/bevy/0.16 /bevy/transform/components/struct.Transform.html#structfield.scale ) | [ ` TransformScaleLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TransformScaleLens.html ) | |
151
+ | [ ` Sprite ` ] ( https://docs.rs/bevy/0.16 /bevy/sprite/struct.Sprite.html ) | [ ` color ` ] ( https://docs.rs/bevy/0.16 /bevy/sprite/struct.Sprite.html#structfield.color ) | [ ` SpriteColorLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.SpriteColorLens.html ) | ` bevy_sprite ` |
152
+ | [ ` Node ` ] ( https://docs.rs/bevy/0.16 /bevy/ui/struct.Node.html ) | [ ` position ` ] ( https://docs.rs/bevy/0.16 /bevy/ui/struct.Node.html ) | [ ` UiPositionLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.UiPositionLens.html ) | ` bevy_ui ` |
153
+ | [ ` BackgroundColor ` ] ( https://docs.rs/bevy/0.16 /bevy/ui/struct.BackgroundColor.html ) | | [ ` UiBackgroundColorLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.UiBackgroundColorLens.html ) | ` bevy_ui ` |
154
+ | [ ` TextColor ` ] ( https://docs.rs/bevy/0.16 /bevy/text/struct.TextColor.html ) | | [ ` TextColorLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.TextColorLens.html ) | ` bevy_text ` |
155
+
156
+ There are two ways to interpolate rotations. See the [ comparison of rotation lenses] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/index.html#rotations ) for details:
157
157
158
158
- ¹ Shortest-path interpolation between two rotations, using ` Quat::slerp() ` .
159
159
- ² Angle-based interpolation, valid for rotations over ½ turn.
@@ -164,7 +164,7 @@ Asset animation always requires the `bevy_asset` feature.
164
164
165
165
| Target Asset | Animated Field | Lens | Feature |
166
166
| ---| ---| ---| ---|
167
- | [ ` ColorMaterial ` ] ( https://docs.rs/bevy/0.15.0 /bevy/sprite/struct.ColorMaterial.html ) | [ ` color ` ] ( https://docs.rs/bevy/0.15.0 /bevy/sprite/struct.ColorMaterial.html#structfield.color ) | [ ` ColorMaterialColorLens ` ] ( https://docs.rs/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /bevy_tweening/lens/struct.ColorMaterialColorLens.html ) | ` bevy_asset ` + ` bevy_sprite ` |
167
+ | [ ` ColorMaterial ` ] ( https://docs.rs/bevy/0.16 /bevy/sprite/struct.ColorMaterial.html ) | [ ` color ` ] ( https://docs.rs/bevy/0.16 /bevy/sprite/struct.ColorMaterial.html#structfield.color ) | [ ` ColorMaterialColorLens ` ] ( https://docs.rs/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /bevy_tweening/lens/struct.ColorMaterialColorLens.html ) | ` bevy_asset ` + ` bevy_sprite ` |
168
168
169
169
## Custom lens
170
170
@@ -222,67 +222,67 @@ The process is similar to custom components, creating a custom lens for the cust
222
222
223
223
## Examples
224
224
225
- See the [ ` examples/ ` ] ( https://github.com/djeedai/bevy_tweening/tree/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples ) folder.
225
+ See the [ ` examples/ ` ] ( https://github.com/djeedai/bevy_tweening/tree/8b3cad18a090078d9055d77a632be44e701aecc7 /examples ) folder.
226
226
227
227
### [ ` menu ` ] ( examples/menu.rs )
228
228
229
229
``` rust
230
230
cargo run -- example menu -- features = " bevy/bevy_winit"
231
231
```
232
232
233
- ![ menu] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/menu.gif )
233
+ ![ menu] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/menu.gif )
234
234
235
235
### [ ` sprite_color ` ] ( examples/sprite_color.rs )
236
236
237
237
``` rust
238
238
cargo run -- example sprite_color -- features = " bevy/bevy_winit"
239
239
```
240
240
241
- ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/sprite_color.gif )
241
+ ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/sprite_color.gif )
242
242
243
243
### [ ` transform_rotation ` ] ( examples/transform_rotation.rs )
244
244
245
245
``` rust
246
246
cargo run -- example transform_rotation -- features = " bevy/bevy_winit"
247
247
```
248
248
249
- ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/transform_rotation.gif )
249
+ ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/transform_rotation.gif )
250
250
251
251
### [ ` transform_translation ` ] ( examples/transform_translation.rs )
252
252
253
253
``` rust
254
254
cargo run -- example transform_translation -- features = " bevy/bevy_winit"
255
255
```
256
256
257
- ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/transform_translation.gif )
257
+ ![ sprite_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/transform_translation.gif )
258
258
259
259
### [ ` colormaterial_color ` ] ( examples/colormaterial_color.rs )
260
260
261
261
``` rust
262
262
cargo run -- example colormaterial_color -- features = " bevy/bevy_winit"
263
263
```
264
264
265
- ![ colormaterial_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/colormaterial_color.gif )
265
+ ![ colormaterial_color] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/colormaterial_color.gif )
266
266
267
267
### [ ` ui_position ` ] ( examples/ui_position.rs )
268
268
269
269
``` rust
270
270
cargo run -- example ui_position -- features = " bevy/bevy_winit"
271
271
```
272
272
273
- ![ ui_position] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/ui_position.gif )
273
+ ![ ui_position] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/ui_position.gif )
274
274
275
275
### [ ` sequence ` ] ( examples/sequence.rs )
276
276
277
277
``` rust
278
278
cargo run -- example sequence -- features = " bevy/bevy_winit"
279
279
```
280
280
281
- ![ sequence] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/5fca4fa0139121adef3cbf8187b31c63fd6273c7 /examples/sequence.gif )
281
+ ![ sequence] ( https://raw.githubusercontent.com/djeedai/bevy_tweening/8b3cad18a090078d9055d77a632be44e701aecc7 /examples/sequence.gif )
282
282
283
283
## Ease Functions
284
284
285
- Many [ ease functions] ( https://docs.rs/bevy/0.15.0 /bevy/math/curve/enum.EaseFunction.html ) are available from ` bevy_math ` :
285
+ Many [ ease functions] ( https://docs.rs/bevy/0.16 /bevy/math/curve/enum.EaseFunction.html ) are available from ` bevy_math ` :
286
286
287
287
- Linear
288
288
> ` f(t) = t `
@@ -373,6 +373,17 @@ Compatibility of `bevy_tweening` versions:
373
373
374
374
Due to the fast-moving nature of Bevy and frequent breaking changes, and the limited resources to maintan 🍃 Bevy Tweening, the ` main ` (unreleased) Bevy branch is not supported. However the ` bevy_tweening ` crate is upgraded shortly after each new ` bevy ` release to support the newly released version.
375
375
376
+ ## License
377
+
378
+ 🍃 Bevy Tweening is dual-licensed under either:
379
+
380
+ - MIT License ([ ` LICENSE-MIT ` ] ( ./LICENSE-MIT ) or < http://opensource.org/licenses/MIT > )
381
+ - Apache License, Version 2.0 ([ ` LICENSE-APACHE2 ` ] ( ./LICENSE-APACHE2 ) or < http://www.apache.org/licenses/LICENSE-2.0 > )
382
+
383
+ at your option.
384
+
385
+ ` SPDX-License-Identifier: MIT OR Apache-2.0 `
386
+
376
387
## Comparison with ` bevy_easings `
377
388
378
389
The ` bevy_tweening ` library started as a fork of [ the ` bevy_easings ` library by François Mocker] ( https://github.com/vleue/bevy_easings ) , with the goals to:
0 commit comments