Three.js Mesh Animation
This mesh-animation demo uses an object of type THREE.AnimationMixer to animate models of a running horse and a flying stork.
The models are in the GLTF format used by three.js and are part of the three.js download (version 129). A GLTF file contains an entire scene and can include animations, as well as objects. In this case, the files that are used contain one object (a horse or stork) and an animation that animates that object. The horse and stork objects come with their colors already defined. If dataFromFile is the data loaded from the file, then the object is dataFromFile.scene.children[0], and the animation is dataFromFile.animations[0]. You can look at the source code of this demo to see how the animation is programmed.
You can use your mouse (or finger) to rotate the model, even when it is animating.
(Note that this demo won't work if you are trying to load it from your local computer instead of from a web server. This is because of web browser security policies that prevent the program from loading the models locally. You can solve the problem by running a local web server or by enabling local file access in your web browser.)