Skip to content

Commit f85c157

Browse files
mockersfItsDoot
authored andcommitted
animation player (bevyengine#4375)
# Objective - Add a basic animation player - Single track - Not generic, can only animate `Transform`s - With plenty of possible optimisations available - Close-ish to bevyengine/rfcs#49 - https://discord.com/channels/691052431525675048/774027865020039209/958820063148929064 ## Solution - Can play animations - looping or not - Can pause animations - Can seek in animation - Can alter speed of animation - I also removed the previous gltf animation example https://user-images.githubusercontent.com/8672791/161051887-e79283f0-9803-448a-93d0-5f7a62acb02d.mp4
1 parent e991dd2 commit f85c157

File tree

18 files changed

+582
-1414
lines changed

18 files changed

+582
-1414
lines changed

CREDITS.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
* Ground tile from [Kenney's Tower Defense Kit](https://www.kenney.nl/assets/tower-defense-kit) (CC0 1.0 Universal)
2222
* Game icons from [Kenney's Game Icons](https://www.kenney.nl/assets/game-icons) (CC0 1.0 Universal)
2323
* Space ships from [Kenny's Simple Space Kit](https://www.kenney.nl/assets/simple-space) (CC0 1.0 Universal)
24-
* glTF animated triangle from [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedTriangle) (CC0 1.0 Universal)
25-
* glTF box animated from [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated) ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) - by [Cesium](https://cesium.com))
24+
* glTF animated fox from [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Fox)
25+
* Low poly fox [by PixelMannen](https://opengameart.org/content/fox-and-shiba) (CC0 1.0 Universal)
26+
* Rigging and animation [by @tomkranis on Sketchfab](https://sketchfab.com/models/371dea88d7e04a76af5763f2a36866bc) ([CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/))

Cargo.toml

+9-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ members = ["crates/*", "examples/ios", "tools/ci", "errors"]
1717

1818
[features]
1919
default = [
20+
"animation",
2021
"bevy_audio",
2122
"bevy_gilrs",
2223
"bevy_winit",
@@ -43,6 +44,7 @@ render = [
4344
]
4445

4546
# Optional bevy crates
47+
bevy_animation = ["bevy_internal/bevy_animation"]
4648
bevy_audio = ["bevy_internal/bevy_audio"]
4749
bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"]
4850
bevy_dynamic_plugin = ["bevy_internal/bevy_dynamic_plugin"]
@@ -98,6 +100,9 @@ bevy_ci_testing = ["bevy_internal/bevy_ci_testing"]
98100
# Enable the "debug asset server" for hot reloading internal assets
99101
debug_asset_server = ["bevy_internal/debug_asset_server"]
100102

103+
# Enable animation support, and glTF animation loading
104+
animation = ["bevy_internal/animation"]
105+
101106
[dependencies]
102107
bevy_dylib = { path = "crates/bevy_dylib", version = "0.7.0-dev", default-features = false, optional = true }
103108
bevy_internal = { path = "crates/bevy_internal", version = "0.7.0-dev", default-features = false }
@@ -183,10 +188,6 @@ path = "examples/3d/lighting.rs"
183188
name = "load_gltf"
184189
path = "examples/3d/load_gltf.rs"
185190

186-
[[example]]
187-
name = "manual_gltf_animation_player"
188-
path = "examples/3d/manual_gltf_animation_player.rs"
189-
190191
[[example]]
191192
name = "many_cubes"
192193
path = "examples/3d/many_cubes.rs"
@@ -236,6 +237,10 @@ name = "wireframe"
236237
path = "examples/3d/wireframe.rs"
237238

238239
# Animation
240+
[[example]]
241+
name = "animated_fox"
242+
path = "examples/animation/animated_fox.rs"
243+
239244
[[example]]
240245
name = "custom_skinned_mesh"
241246
path = "examples/animation/custom_skinned_mesh.rs"

assets/models/animated/AnimatedTriangle.gltf

-118
This file was deleted.

0 commit comments

Comments
 (0)