Implementing the glTF animation player
Let’s start by building a foundation for our glTF animation player. Before we do skinned animations, advanced morphing, or complex blending, we first need to implement the basic animation rendering capabilities using the glTF data we loaded in the previous recipes. Let’s walk through how to set up and extend our glTF viewer to support this essential animation rendering.
Getting ready
Make sure to read the previous recipe, Importing skeleton and animation data, to recap the data structures we use to store glTF animation data.
The source code for this recipe is located in Chapter09/01_AnimationPlayer.
How to do it…
To begin, let’s introduce the data structures and helper functions needed to support animation playback. We will use them to implement all further animation rendering functionality in our glTF viewer.
- First, we need a way to track the state of an active animation. This includes...