Replies: 2 comments 5 replies
-
I think doing it programmatically would be hard. Blender is the right approach for this. Unless your files are very uniform, in which case you might look at modifying the glTF JSON directly (after unpacking the GLB). VSCode has a nice glTF plugin for this, but it's probably still a pain. |
Beta Was this translation helpful? Give feedback.
2 replies
-
So, I guess a getter and setter for animations is out of the question? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
So, I have a bunch of glb (originally fbx) files, each is one model with a set of animations. What I want is to be able to use the animations from one file, with the model of another file.
When I was working with threejs (which I had to drop due to errors when importing models) I could load both models, but only put one of them in the scene, then I would store the other model's animations (clips) in a variable and let the user select which one to play. This worked as intended, but as I mentioned, the models would load wrongly.
I tried swapping animations in blender, and exporting the model with the animations swapped into a glb file, which I then loaded in
the online editor
https://modelviewer.dev/editor/
As well as in my project, and everything works fine in both, so I would like to know if there's a way to support doing it programmatically, if it's already there I didn't find it in the docs.
Version
model-viewer: v3.3.0
Beta Was this translation helpful? Give feedback.
All reactions