David Catuhe 7 лет назад
Родитель
Сommit
4be6e72268
2 измененных файлов с 14 добавлено и 1 удалено
  1. 9 0
      gui/src/2D/controls/grid.ts
  2. 5 1
      src/Mesh/babylon.mesh.ts

+ 9 - 0
gui/src/2D/controls/grid.ts

@@ -337,5 +337,14 @@ module BABYLON.GUI {
 
             super._additionalProcessing(parentMeasure, context);
         }
+
+        /** Releases associated resources */
+        public dispose() {
+            super.dispose();
+
+            for (var control of this._childControls) {
+                control.dispose();
+            }
+        }
     }
 }

+ 5 - 1
src/Mesh/babylon.mesh.ts

@@ -2621,7 +2621,11 @@
                             instance.animations.push(Animation.Parse(parsedAnimation));
                         }
                         Node.ParseAnimationRanges(instance, parsedMesh, scene);
-                    }
+
+                        if (parsedMesh.autoAnimate) {
+                            scene.beginAnimation(instance, parsedMesh.autoAnimateFrom, parsedMesh.autoAnimateTo, parsedMesh.autoAnimateLoop, parsedMesh.autoAnimateSpeed || 1.0);
+                        }                            
+                }
                 }
             }