Skip to content

Commit

Permalink
improve coverage a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
markw65 committed Oct 19, 2021
1 parent ae1876f commit 7bb0d56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 3 additions & 5 deletions Source/Scene/ModelAnimationCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,9 @@ ModelAnimationCollection.prototype.update = function (frameState) {
continue;
}
scheduledAnimation._prevAnimationTime = scheduledAnimation.animationTime;
if (duration !== 0.0) {
delta = scheduledAnimation.animationTime / duration;
} else {
delta = 0.0;
}
delta =
duration !== 0.0 ? scheduledAnimation.animationTime / duration : 0.0;

play = true;
} else {
if (!defined(scheduledAnimation._computedStartTime)) {
Expand Down
3 changes: 2 additions & 1 deletion Specs/Scene/ModelSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1849,8 +1849,9 @@ describe(
scene.renderForSpecs(time);
a.animationTime = 0.5;
scene.renderForSpecs(JulianDate.addSeconds(time, 1.0, new JulianDate()));
a.animationTime = 1.7;
scene.renderForSpecs(JulianDate.addSeconds(time, 2.0, new JulianDate()));
a.animationTime = 1.7;
scene.renderForSpecs(JulianDate.addSeconds(time, 3.0, new JulianDate()));

expect(spyUpdate.calls.count()).toEqual(3);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(
Expand Down

0 comments on commit 7bb0d56

Please sign in to comment.