瀏覽代碼

Add loadedAnimationGroups to MeshAssetTask

Gary Hsu 6 年之前
父節點
當前提交
179271db1d
共有 1 個文件被更改,包括 6 次插入1 次删除
  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
          * Gets the list of loaded skeletons
          */
          */
         public loadedSkeletons: Array<Skeleton>;
         public loadedSkeletons: Array<Skeleton>;
+        /**
+         * Gets the list of loaded animation groups
+         */
+        public loadedAnimationGroups: Array<AnimationGroup>;
 
 
         /**
         /**
          * Callback called when the task is successful
          * 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) {
         public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {
             SceneLoader.ImportMesh(this.meshesNames, this.rootUrl, this.sceneFilename, scene,
             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.loadedMeshes = meshes;
                     this.loadedParticleSystems = particleSystems;
                     this.loadedParticleSystems = particleSystems;
                     this.loadedSkeletons = skeletons;
                     this.loadedSkeletons = skeletons;
+                    this.loadedAnimationGroups = animationGroups;
                     onSuccess();
                     onSuccess();
                 }, null, (scene, message, exception) => {
                 }, null, (scene, message, exception) => {
                     onError(message, exception);
                     onError(message, exception);