Browse Source

Add loadedAnimationGroups to MeshAssetTask

Gary Hsu 6 years ago
parent
commit
179271db1d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Tools/babylon.assetsManager.ts

+ 6 - 1
src/Tools/babylon.assetsManager.ts

@@ -215,6 +215,10 @@ module BABYLON {
          * Gets the list of loaded skeletons
          */
         public loadedSkeletons: Array<Skeleton>;
+        /**
+         * Gets the list of loaded animation groups
+         */
+        public loadedAnimationGroups: Array<AnimationGroup>;
 
         /**
          * Callback called when the task is successful
@@ -261,10 +265,11 @@ module BABYLON {
          */
         public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {
             SceneLoader.ImportMesh(this.meshesNames, this.rootUrl, this.sceneFilename, scene,
-                (meshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[]) => {
+                (meshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[]) => {
                     this.loadedMeshes = meshes;
                     this.loadedParticleSystems = particleSystems;
                     this.loadedSkeletons = skeletons;
+                    this.loadedAnimationGroups = animationGroups;
                     onSuccess();
                 }, null, (scene, message, exception) => {
                     onError(message, exception);