I am currently working on a WebXR project in which I am dynamically creating animations at runtime. Short summary, I do this by creating BABYLON.Animation instances, creating a number of keyframes which I then set as the keys, then I push the animations onto the meshes I want to animate.
This works, but I also want to persist these animations beyond the current session so I can reuse them in later sessions. I tried serializing the animations and saving them as json strings in the “localStorage” of the browser, but when I parse them back, it throws a type error I don’t really understand. I created a Playground to summarize what I am trying to do.