File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -370,13 +370,15 @@ define([
370
370
var pastStartTime = ( delta >= 0.0 ) ;
371
371
372
372
// Play animation if
373
- // * we are after the start time, and
373
+ // * we are after the start time or the animation is being repeated , and
374
374
// * before the end of the animation's duration or the animation is being repeated, and
375
375
// * we did not reach a user-provided stop time.
376
- var play = pastStartTime &&
377
- ( ( delta <= 1.0 ) ||
378
- ( ( scheduledAnimation . loop === ModelAnimationLoop . REPEAT ) ||
379
- ( scheduledAnimation . loop === ModelAnimationLoop . MIRRORED_REPEAT ) ) ) &&
376
+
377
+ var repeat = ( ( scheduledAnimation . loop === ModelAnimationLoop . REPEAT ) ||
378
+ ( scheduledAnimation . loop === ModelAnimationLoop . MIRRORED_REPEAT ) ) ;
379
+
380
+ var play = ( pastStartTime || ( repeat && ! defined ( scheduledAnimation . startTime ) ) ) &&
381
+ ( ( delta <= 1.0 ) || repeat ) &&
380
382
( ! defined ( stopTime ) || JulianDate . lessThanOrEquals ( sceneTime , stopTime ) ) ;
381
383
382
384
if ( play ) {
You can’t perform that action at this time.
0 commit comments