Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bevy Tweening
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy Forks
Bevy Tweening
Commits
b6f8cfde
Commit
b6f8cfde
authored
3 years ago
by
Jerome Humbert
Browse files
Options
Downloads
Patches
Plain Diff
Document features in `README.md`
parent
6619f067
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+30
-16
30 additions, 16 deletions
README.md
with
30 additions
and
16 deletions
README.md
+
30
−
16
View file @
b6f8cfde
...
@@ -18,9 +18,23 @@ Tweening animation plugin for the Bevy game engine.
...
@@ -18,9 +18,23 @@ Tweening animation plugin for the Bevy game engine.
## Usage
## Usage
### Dependency
Add to
`Cargo.toml`
:
```
toml
[dependencies]
bevy_tweening
=
"0.3"
```
This crate supports the following features:
-
`bevy_sprite`
(default) : Includes built-in lenses for some
`Sprite`
-related components.
-
`bevy_ui`
(default) : Includes built-in lenses for some UI-related components.
### System setup
### System setup
Add the
t
weening
p
lugin to your app:
Add the
`T
weening
P
lugin
`
to your app:
```
rust
```
rust
App
::
default
()
App
::
default
()
...
@@ -93,18 +107,18 @@ The naming scheme for predefined lenses is `"<TargetName><FieldName>Lens"`, wher
...
@@ -93,18 +107,18 @@ The naming scheme for predefined lenses is `"<TargetName><FieldName>Lens"`, wher
### Bevy Components
### Bevy Components
| Target Component | Animated Field | Lens |
| Target Component | Animated Field | Lens |
Feature |
|---|---|---|
|---|---|---|
---|
|
[
`
Sprite
`
](
https://docs.rs/bevy/0.6.1/bevy/
sprite/struct.Sprite.html
)
|
[
`color`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.Sprite.html#structfield.color
)
|
[
`SpriteColor
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.
SpriteColor
Lens.html
)
|
|
[
`
Transform
`
](
https://docs.rs/bevy/0.6.1/bevy/
transform/components/struct.Transform.html
)
|
[
`translation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.translation
)
|
[
`TransformPosition
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.
TransformPosition
Lens.html
)
|
|
|
[
`Transform`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html
)
|
[
`transl
ation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.
transl
ation
)
|
[
`Transform
Posi
tionLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.Transform
Posi
tionLens.html
)
|
|
|
[
`rot
ation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.
rot
ation
)
(
`Quat`
)
¹
|
[
`Transform
Rota
tionLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.Transform
Rota
tionLens.html
)
|
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
`Quat`
)
¹
|
[
`TransformRotat
ion
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotat
ion
Lens.html
)
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
²
|
[
`TransformRotat
eX
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotat
eX
Lens.html
)
|
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
X
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
X
Lens.html
)
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
Y
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
Y
Lens.html
)
|
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
Y
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
Y
Lens.html
)
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
Z
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
Z
Lens.html
)
|
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
Z
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
Z
Lens.html
)
|
| |
[
`rotation`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.rotation
)
(
angle
)
² |
[
`TransformRotate
Axis
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TransformRotate
Axis
Lens.html
)
|
|
| |
[
`
rotation
`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.
rotation
)
(
ang
le
)
²
|
[
`Transform
RotateAxis
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.Transform
RotateAxis
Lens.html
)
|
| |
[
`
scale
`
](
https://docs.rs/bevy/0.6.1/bevy/transform/components/struct.Transform.html#structfield.
sca
le
)
|
[
`Transform
Scale
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.Transform
Scale
Lens.html
)
|
|
|
|
[
`
scal
e`
](
https://docs.rs/bevy/0.6.1/bevy/
transform/components/struct.Transform
.html#structfield.
scale
)
|
[
`
TransformScale
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.
TransformScaleLens.html
)
|
|
[
`
Sprit
e`
](
https://docs.rs/bevy/0.6.1/bevy/
sprite/struct.Sprite.html
)
|
[
`color`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.Sprite
.html#structfield.
color
)
|
[
`
SpriteColor
Lens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.
SpriteColorLens.html
)
|
`bevy_sprite`
|
|
[
`Style`
](
https://docs.rs/bevy/0.6.1/bevy/ui/struct.Style.html
)
|
[
`position`
](
https://docs.rs/bevy/0.6.1/bevy/ui/struct.Style.html#structfield.position
)
|
[
`UiPositionLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.UiPositionLens.html
)
|
|
[
`Style`
](
https://docs.rs/bevy/0.6.1/bevy/ui/struct.Style.html
)
|
[
`position`
](
https://docs.rs/bevy/0.6.1/bevy/ui/struct.Style.html#structfield.position
)
|
[
`UiPositionLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.UiPositionLens.html
)
|
`bevy_ui`
|
|
[
`Text`
](
https://docs.rs/bevy/0.6.1/bevy/text/struct.Text.html
)
|
[
`TextStyle::color`
](
https://docs.rs/bevy/0.6.1/bevy/text/struct.TextStyle.html#structfield.color
)
|
[
`TextColorLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TextColorLens.html
)
|
|
[
`Text`
](
https://docs.rs/bevy/0.6.1/bevy/text/struct.Text.html
)
|
[
`TextStyle::color`
](
https://docs.rs/bevy/0.6.1/bevy/text/struct.TextStyle.html#structfield.color
)
|
[
`TextColorLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.TextColorLens.html
)
|
`bevy_ui`
|
¹ Shortest-path interpolation between two rotations, using
`Quat::slerp()`
.
¹ Shortest-path interpolation between two rotations, using
`Quat::slerp()`
.
...
@@ -114,9 +128,9 @@ See the [comparison of rotation lenses](https://docs.rs/bevy_tweening/latest/bev
...
@@ -114,9 +128,9 @@ See the [comparison of rotation lenses](https://docs.rs/bevy_tweening/latest/bev
### Bevy Assets
### Bevy Assets
| Target Asset | Animated Field | Lens |
| Target Asset | Animated Field | Lens |
Feature |
|---|---|---|
|---|---|---|
---|
|
[
`ColorMaterial`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.ColorMaterial.html
)
|
[
`color`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.ColorMaterial.html#structfield.color
)
|
[
`ColorMaterialColorLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.ColorMaterialColorLens.html
)
|
|
[
`ColorMaterial`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.ColorMaterial.html
)
|
[
`color`
](
https://docs.rs/bevy/0.6.1/bevy/sprite/struct.ColorMaterial.html#structfield.color
)
|
[
`ColorMaterialColorLens`
](
https://docs.rs/bevy_tweening/latest/bevy_tweening/struct.ColorMaterialColorLens.html
)
|
`bevy_sprite`
|
## Custom lens
## Custom lens
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment