SceneLoader cannot independently control the status of animationGroups when importing Mesh

I think this is not very good, because only the first group is played by default. This may cause some confusion, and there may be scenes where you do not want the animation to be played by default.
There is a scenario where if the initial state of my animation is different from the initial state of the mesh, then if I importMesh and then stop the animation, the mesh display may not be correct.

In addition, onProgress is not called in gltfLoader2.0.

cc @bghgary

1 Like

Progress is handled at the glTFFileLoader level.

About the animation start mode it can be changed to one of the following if the default does not fit with your app.


I use SceneLoader.ImportMeshAsync to import mesh.This method cannot set GLTFLoaderAnimationStartMode.

You can by accessing the plugin:

BABYLON.SceneLoader.OnPluginActivatedObservable.addOnce(function (loader) {
    // This is just a precaution as this isn't strictly necessary since
    // the only loader in use is the glTF one.
    if ( !== "gltf") return;

    loader.animationStartMode = ...
1 Like

Thanks for your reply!

For gltfLoader1.0, there seems to be no similar method to handle it.
In addition, modifying the loader according to your method will not take effect.

It seems to work here:

As for glTF 1.0, it has been deprecated in favor of glTF 2.0, for which there has been no further development for several years.