I import an object from .fbx format to .glb format using a converter
In converter there is a result of model in glb format with animation
but when I import an object in three.js with GLTFLoader gltf , I have no animation
Why ?
object in fbx
main-2.fbx (845.8 KB)
looeee
November 29, 2018, 10:58am
2
Here’s the converted .glb file for anyone else looking at this:
main-main.glb (3.1 MB)
It seems to be working fine to me, testing here:
@sts_1994 you can’t load the file on codepen like that due to cross-origin errors (check your browser console).
Try setting up a local dev server and running it there. See the How To Run Things Locally guide for more info.
No, I have a model in codepen and haven’t have error Acces Alllow origin (i have a plugin for it)
My model hasn’t got an animation and it’s view is not similar as https://blackthread.io/loader/
You can load this model in github.io and see, if you have a problem with Access allow origin
this model with no animation if I use GLTFLoader from three js loaders example
what the version of GLTF Loader I can use ? If the current version is in npm ?
My final result
The model is not as in converter view and has no animation
looeee
November 29, 2018, 12:56pm
6
Use this one:
https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js
It’s the same one used here: https://gltf-viewer.donmccurdy.com/
Your model works fine in @donmccurdy ’s viewer using the latest GLTFLoader.
Looking through your code, you are not playing back the animations. See this example for details on how to set up animations on a gltf model - three.js examples
Specifically, these lines:
Thank you.Animation works.
1 Like
if the last version is in npm ?
/**
* @author Rich Tibbett / https://github.com/richtr
* @author mrdoob / http://mrdoob.com/
* @author Tony Parisi / http://www.tonyparisi.com/
* @author Takahiro / https://github.com/takahirox
* @author Don McCurdy / https://www.donmccurdy.com
*/
THREE.GLTFLoader = ( function () {
function GLTFLoader( manager ) {
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
this.dracoLoader = null;
}
GLTFLoader.prototype = {
constructor: GLTFLoader,
This file has been truncated. show original