瀏覽代碼

Merge pull request #5693 from bghgary/assetsManager-fix

Assets manager fix
David Catuhe 6 年之前
父節點
當前提交
6b4ce634b3
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 2 0
      dist/preview release/what's new.md
  2. 6 1
      src/Tools/babylon.assetsManager.ts

+ 2 - 0
dist/preview release/what's new.md

@@ -161,6 +161,8 @@
 
 ### Loaders
 
+- Added missing `loadedAnimationGroups` to `MeshAssetTask` ([bghgary](https://github.com/bghgary))
+
 ## Breaking changes
 
 - `Database.IDBStorageEnabled` is now false by default ([Deltakosh](https://github.com/deltakosh))

+ 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);