UseFrame does not get exported by GLTFExporter #2380
Replies: 3 comments
-
|
Beta Was this translation helpful? Give feedback.
-
hmm so i would have to recreate the animation that I created in my useFrame hook in the export function? Could the client library include that I think the gltf data structure created by the react-three fiber library is a little different than the one created with standard three js. When attempting to use this line on your linked sandbox |
Beta Was this translation helpful? Give feedback.
-
r3f is just a renderer, you are using and writing plain threejs. there is no difference between any of threejs primitives. gltfexporter is something that threejs itself offers, fiber has nothing to do with it. perhaps you are using gltfexporter from three-stdlib instead of three/jsm/... and stdlib is perhaps a little out of date but otherwise, react cannot possibly change how any of this works. as for animations, gltf work with time frames, they are different from controlling an object with code. likewise in plain threejs, if you animate something with a Math.sin function or whatever, none of it can be reflected in the exporter. unless you create time frames for it manually. imo fiber could actually do it since it is deterministic, you can run frames with the advance function for instance. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
"@react-three/fiber": "^8.2.0",
"three": "^0.142.0",
Hello I am trying to export a model containing animations. My model uses the useFrame hook and manipulates the ref like so
I then export the model with the GLTFExporter in a parent component
I see the saveRef.current does not have the animations.
Is there documentation or a recommended way to save animations for importing into a model later? Seems all documentation shows this as the recommended way so I think this is a bug
Beta Was this translation helpful? Give feedback.
All reactions