Sets the minimum frame that the animation will start from when playing or looping.
519617
public void setMinFrame(final int minFrame) {
    if (composition == null) {
      lazyCompositionTasks.add(new LazyCompositionTask() {
        @Override
        public void run(LottieComposition composition) {
          setMinFrame(minFrame);
        }
      });
      return;
    }
    animator.setMinFrame(minFrame);
  }
563429
public void setAnimationBackend(@Nullable AnimationBackend animationBackend) {
    mAnimationBackend = animationBackend;
    if (mAnimationBackend != null) {
      mFrameScheduler = new DropFramesFrameScheduler(mAnimationBackend);
      mAnimationBackend.setBounds(getBounds());
      if (mDrawableProperties != null) {
        // re-apply to the same drawable so that the animation backend is updated.
        mDrawableProperties.applyTo(this);
      }
    }
    mFrameScheduler = createSchedulerForBackendAndDelayMethod(mAnimationBackend);
    stop();
  }
805005
function animationLoop() {
  var
    // grab current time
    t = time(),
    // calculate how many millisends we have
    fps = 1000 / next.minFPS,
    // used to flag overtime in case we exceed milliseconds
    overTime = false,
    // take current frame queue length
    length = getLength(qframe, qframex)
  ;
  // if there is actually something to do
  if (length) {
    // reschedule upfront next animation frame
    // this prevents the need for a try/catch within the while loop
    requestAnimationFrame(animationLoop);
    // reassign qframex cleaning current animation frame queue
    qframex = qframe.splice(0, length);
    while (qframex.length) {
      // if some of them fails, it's OK
      // next round will re-prioritize the animation frame queue
      exec(qframex.shift());
      // if we exceeded the frame time, get out this loop
      overTime = (time() - t) >= fps;
      if ((next.isOverloaded = overTime)) break;
    }
    // if overtime and debug is true, warn about it
    if (overTime && next.debug) console.warn('overloaded frame');
  } else {
    // all frame callbacks have been executed
    // we can actually stop asking for animation frames
    frameRunning = false;
    // and flag it as non busy/overloaded anymore
    next.isOverloaded = frameRunning;
  }
}
540104
public GVRAnimator start(int animIndex)
    {
        if ((animIndex < 0) || (animIndex >= mAnimations.size()))
        {
            throw new IndexOutOfBoundsException("Animation index out of bounds");
        }
        GVRAnimator anim = mAnimations.get(animIndex);
        start(anim);
        return anim;
    }
708093
public void setMode(int mode, boolean animation){
        if(mMode != mode){
            mMode = mode;

            if(mOnTimeChangedListener != null)
                mOnTimeChangedListener.onModeChanged(mMode);

            if(animation)
                startAnimation();
            else
                invalidate();
        }
    }
1158914
function Animation(target, opts, opts2) {
  var isCore = core(target);
  var isEle = !isCore;

  var _p = this._private = extend({
    duration: 1000
  }, opts, opts2);

  _p.target = target;
  _p.style = _p.style || _p.css;
  _p.started = false;
  _p.playing = false;
  _p.hooked = false;
  _p.applying = false;
  _p.progress = 0;
  _p.completes = [];
  _p.frames = [];

  if (_p.complete && fn(_p.complete)) {
    _p.completes.push(_p.complete);
  }

  if (isEle) {
    var pos = target.position();
    _p.startPosition = _p.startPosition || {
      x: pos.x,
      y: pos.y
    };
    _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style);
  }

  if (isCore) {
    var pan = target.pan();
    _p.startPan = {
      x: pan.x,
      y: pan.y
    };
    _p.startZoom = target.zoom();
  } // for future timeline/animations impl


  this.length = 1;
  this[0] = this;
}
252943
public void setValue(float value, boolean animation){
        value = Math.min(mMaxValue, Math.max(value, mMinValue));
        setPosition((value - mMinValue) / (mMaxValue - mMinValue), animation);
    }
215359
void startAnimation() {
        if (getVisibility() != VISIBLE) {
            return;
        }

        if (mIndeterminateDrawable instanceof Animatable) {
            mShouldStartAnimationDrawable = true;
            mAnimation = null;
        } else {
            if (mInterpolator == null) {
                mInterpolator = new LinearInterpolator();
            }

            mTransformation = new Transformation();
            mAnimation = new AlphaAnimation(0.0f, 1.0f);
            mAnimation.setRepeatMode(mBehavior);
            mAnimation.setRepeatCount(Animation.INFINITE);
            mAnimation.setDuration(mDuration);
            mAnimation.setInterpolator(mInterpolator);
            mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
        }
        postInvalidate();
    }
684771
def animate(self, animation, static, score, best, appear):
        """"""

        # Create a surface of static parts in the animation.
        surface = pygame.Surface((self.game_width, self.game_height), 0)
        surface.fill(self.BACKGROUND)

        # Draw all static tiles.
        for y in range(self.COUNT_Y):
            for x in range(self.COUNT_X):
                x1, y1 = self.get_tile_location(x, y)
                x1 -= self.origin[0]
                y1 -= self.origin[1]
                surface.blit(self.tiles[static.get((x, y), 0)], (x1, y1))

        # Pygame clock for FPS control.
        clock = pygame.time.Clock()

        if score:
            score_label = self.label_font.render('+%d' % score, True, (119, 110, 101))
            w1, h1 = score_label.get_size()

        if best:
            best_label = self.label_font.render('+%d' % best, True, (119, 110, 101))
            w2, h2 = best_label.get_size()

        # Loop through every frame.
        for frame in range(self.ANIMATION_FRAMES):
            # Limit at 60 fps.
            clock.tick(60)

            # Pump events.
            pygame.event.pump()

            self.screen.blit(surface, self.origin)

            # Calculate animation progress.
            dt = (frame + 0.) / self.ANIMATION_FRAMES

            for tile in animation:
                self.screen.blit(self.tiles[tile.value], tile.get_position(dt))

            # Scale the images to be proportional to the square root allows linear size increase.
            scale = dt ** 0.5

            w, h = int(self.cell_width * scale) & ~1, int(self.cell_height * scale) & ~1

            for x, y, value in appear:
                self.screen.blit(self._scale_tile(value, w, h),
                                 self._center_tile(self.get_tile_location(x, y), (w, h)))

            # Draw the score boxes and get their location, if we are drawing scores.
            if best or score:
                (x1, y1), (x2, y2), w, h = self.draw_scores()
            if score:
                self.screen.blit(score_label, (x1 + (w - w1) / 2, y1 + (h - h1) / 2 - dt * h))
            if best:
                self.screen.blit(best_label, (x2 + (w - w2) / 2, y2 + (h - h2) / 2 - dt * h))

            pygame.display.flip()
395611
public void setMaxFrame(final int maxFrame) {
    if (composition == null) {
      lazyCompositionTasks.add(new LazyCompositionTask() {
        @Override
        public void run(LottieComposition composition) {
          setMaxFrame(maxFrame);
        }
      });
      return;
    }
    animator.setMaxFrame(maxFrame + 0.99f);
  }
390968
private Animator preparePulseAnimation() {
        AnimatorSet animation = new AnimatorSet();

        Animator firstBounce = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.CIRCLE_SCALE_PROPERTY,
                drawable.getCircleScale(), 0.88f);
        firstBounce.setDuration(300);
        firstBounce.setInterpolator(new CycleInterpolator(1));
        Animator secondBounce = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.CIRCLE_SCALE_PROPERTY,
                0.75f, 0.83f);
        secondBounce.setDuration(300);
        secondBounce.setInterpolator(new CycleInterpolator(1));
        Animator thirdBounce = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.CIRCLE_SCALE_PROPERTY,
                0.75f, 0.80f);
        thirdBounce.setDuration(300);
        thirdBounce.setInterpolator(new CycleInterpolator(1));

        animation.playSequentially(firstBounce, secondBounce, thirdBounce);
        return animation;
    }
232334
public synchronized void nextFrame() {
        currentFrame++;
        if(currentFrame >= frames.size()) {
            currentFrame = 0;
        }
        super.setLines(frames.get(currentFrame));
        invalidate();
    }
138713
public void setProgressWithAnimation(float progress, int duration) {
        if (progressAnimator != null) {
            progressAnimator.cancel();
        }
        progressAnimator = ValueAnimator.ofFloat(this.progress, progress);
        progressAnimator.setDuration(duration);
        progressAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                float progress = (Float) animation.getAnimatedValue();
                setProgress(progress, true);
                if (indeterminateMode) {
                    float updateAngle = progress * 360 / 100;
                    startAngle = DEFAULT_START_ANGLE + (rightToLeft ? updateAngle : -updateAngle);
                }
            }
        });
        progressAnimator.start();
    }
1086099
function(){

            canvas = document.getElementById("canvas");
            canvas.width = Zone.prototype.WIDTH;
            canvas.height =  Zone.prototype.HEIGHT;

            frameCount = 0;

            if (GameView.isRunning()){
                run();
            }

            //Add a listener on our global gameData object, to know when our game starts/stops
            gameData.on("change:isRunning", function(model, value){
                value ? run() : reset();
            });
        }
539332
private void startStripedAnimationIfNeeded() {
        if (!striped || !animated) {
            return;
        }

        clearAnimation();

        progressAnimator = ValueAnimator.ofFloat(0, 0);
        progressAnimator.setDuration(UPDATE_ANIM_MS);
        progressAnimator.setRepeatCount(ValueAnimator.INFINITE);
        progressAnimator.setRepeatMode(ValueAnimator.RESTART);

        progressAnimator.setInterpolator(new LinearInterpolator());
        progressAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                invalidate();
            }
        });
        progressAnimator.start();
    }
680599
public AppMsg setAnimation(Animation inAnimation, Animation outAnimation) {
        mInAnimation = inAnimation;
        mOutAnimation = outAnimation;
        return this;
    }
1331514
def _updateFrame(self):
        
        mov = self.movie()
        if mov:
            self.setIcon(QtGui.QIcon(mov.currentPixmap()))