How to blend animations with individual frames

Hey there,

I am currently animating a gltf object by sending animation data in the form of individual frames from a server to my client. By applying the skeletal transforms directly I can animate my gltf model.

I also have animation data locally on my client, which I want to use when the connection to the server is lost/is slow etc. But I am stuck on how to smoothly transition from setting the frames from the server, to setting the local frames on my client. My goal is to keep applying the transforms from the last frame I received from the server (before connection loss), while slowly increasing the amount by which I apply the frames from my local animation data.

But because I am setting the transforms directly from the animation data (i.e. position, rotation, scale), I am unsure of how I can blend between frames e.g. (1 * serverFrame + 0 * localFrame —> 0 * serverFrame + 1 * localFrame). Does anyone have ideas?

use blender to blend animations

That is not an option, I would like to be able to do it using three.js only