forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - Load informations for animations from GLTF - Make experimenting on animations easier # Non Objective - Implement a solutions for all animations in Bevy. This would need a discussion / RFC. The goal here is only to have the information available to try different APIs ## Solution - Load animations with a representation close to the GLTF spec - Add an example to display animations. There is an animation driver in the example, not in Bevy code, to show how it can be used. The example is cycling between examples from the official gltf sample ([AnimatedTriangle](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedTriangle), [BoxAnimated](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated)), and one from me with some cases not present in the official examples. https://user-images.githubusercontent.com/8672791/150696656-073403f0-d921-43b6-beaf-099c7aee16ed.mp4 Co-authored-by: Carter Anderson <[email protected]>
- Loading branch information
Showing
9 changed files
with
1,422 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"scene" : 0, | ||
"scenes" : [ | ||
{ | ||
"nodes" : [ 0 ] | ||
} | ||
], | ||
|
||
"nodes" : [ | ||
{ | ||
"mesh" : 0, | ||
"rotation" : [ 0.0, 0.0, 0.0, 1.0 ] | ||
} | ||
], | ||
|
||
"meshes" : [ | ||
{ | ||
"primitives" : [ { | ||
"attributes" : { | ||
"POSITION" : 1 | ||
}, | ||
"indices" : 0 | ||
} ] | ||
} | ||
], | ||
|
||
"animations": [ | ||
{ | ||
"samplers" : [ | ||
{ | ||
"input" : 2, | ||
"interpolation" : "LINEAR", | ||
"output" : 3 | ||
} | ||
], | ||
"channels" : [ { | ||
"sampler" : 0, | ||
"target" : { | ||
"node" : 0, | ||
"path" : "rotation" | ||
} | ||
} ] | ||
} | ||
], | ||
|
||
"buffers" : [ | ||
{ | ||
"uri" : "data:application/octet-stream;base64,AAABAAIAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAA=", | ||
"byteLength" : 44 | ||
}, | ||
{ | ||
"uri" : "data:application/octet-stream;base64,AAAAAAAAgD4AAAA/AABAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAD0/TQ/9P00PwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAPT9ND/0/TS/AAAAAAAAAAAAAAAAAACAPw==", | ||
"byteLength" : 100 | ||
} | ||
], | ||
"bufferViews" : [ | ||
{ | ||
"buffer" : 0, | ||
"byteOffset" : 0, | ||
"byteLength" : 6, | ||
"target" : 34963 | ||
}, | ||
{ | ||
"buffer" : 0, | ||
"byteOffset" : 8, | ||
"byteLength" : 36, | ||
"target" : 34962 | ||
}, | ||
{ | ||
"buffer" : 1, | ||
"byteOffset" : 0, | ||
"byteLength" : 100 | ||
} | ||
], | ||
"accessors" : [ | ||
{ | ||
"bufferView" : 0, | ||
"byteOffset" : 0, | ||
"componentType" : 5123, | ||
"count" : 3, | ||
"type" : "SCALAR", | ||
"max" : [ 2 ], | ||
"min" : [ 0 ] | ||
}, | ||
{ | ||
"bufferView" : 1, | ||
"byteOffset" : 0, | ||
"componentType" : 5126, | ||
"count" : 3, | ||
"type" : "VEC3", | ||
"max" : [ 1.0, 1.0, 0.0 ], | ||
"min" : [ 0.0, 0.0, 0.0 ] | ||
}, | ||
{ | ||
"bufferView" : 2, | ||
"byteOffset" : 0, | ||
"componentType" : 5126, | ||
"count" : 5, | ||
"type" : "SCALAR", | ||
"max" : [ 1.0 ], | ||
"min" : [ 0.0 ] | ||
}, | ||
{ | ||
"bufferView" : 2, | ||
"byteOffset" : 20, | ||
"componentType" : 5126, | ||
"count" : 5, | ||
"type" : "VEC4", | ||
"max" : [ 0.0, 0.0, 1.0, 1.0 ], | ||
"min" : [ 0.0, 0.0, 0.0, -0.707 ] | ||
} | ||
], | ||
|
||
"asset" : { | ||
"version" : "2.0" | ||
} | ||
|
||
} |
Oops, something went wrong.