Browse Source

new public API

Raanan Weber 7 years ago
parent
commit
632c945332
2 changed files with 5 additions and 5 deletions
  1. 4 4
      Viewer/src/model/modelAnimation.ts
  2. 1 1
      Viewer/src/model/viewerModel.ts

+ 4 - 4
Viewer/src/model/modelAnimation.ts

@@ -76,8 +76,8 @@ export class GroupModelAnimation implements IModelAnimation {
 
     public get currentFrame(): number {
         // get the first currentFrame found
-        for (let i = 0; i < this._animationGroup['_animatables'].length; ++i) {
-            let animatable: Animatable = this._animationGroup['_animatables'][i];
+        for (let i = 0; i < this._animationGroup.animatables.length; ++i) {
+            let animatable: Animatable = this._animationGroup.animatables[i];
             let animations = animatable.getAnimations();
             if (!animations || !animations.length) {
                 continue;
@@ -93,8 +93,8 @@ export class GroupModelAnimation implements IModelAnimation {
 
     public get fps(): number {
         // get the first currentFrame found
-        for (let i = 0; i < this._animationGroup['_animatables'].length; ++i) {
-            let animatable: Animatable = this._animationGroup['_animatables'][i];
+        for (let i = 0; i < this._animationGroup.animatables.length; ++i) {
+            let animatable: Animatable = this._animationGroup.animatables[i];
             let animations = animatable.getAnimations();
             if (!animations || !animations.length) {
                 continue;

+ 1 - 1
Viewer/src/model/viewerModel.ts

@@ -65,7 +65,7 @@ export class ViewerModel implements IDisposable {
             animation.start();
             return animation;
         } else {
-            throw new Error("aniamtion not found - " + name);
+            throw new Error("animation not found - " + name);
         }
     }