popAnimation transition
774976
public void popAnimation(boolean on) {
        popAnimationSpring.setEndValue(on ? 1 : 0);
        popAnimationSpring1.setEndValue(on ? 1 : 0);
        popAnimationSpring2.setEndValue(on ? 1 : 0);
        popAnimationSpring3.setEndValue(on ? 1 : 0);
        popAnimationSpring4.setEndValue(on ? 1 : 0);
    }
1183657
function configureScopeAndTransitions(options) {
          options = options || { };
          if (options.template) {
            options.template = $mdUtil.processTemplate(options.template);
          }

          return angular.extend({
            preserveScope: false,
            cancelAutoHide : angular.noop,
            scope: options.scope || $rootScope.$new(options.isolateScope),

            /**
             * Default usage to enable $animate to transition-in; can be easily overridden via 'options'
             */
            onShow: function transitionIn(scope, element, options) {
              return $animate.enter(element, options.parent);
            },

            /**
             * Default usage to enable $animate to transition-out; can be easily overridden via 'options'
             */
            onRemove: function transitionOut(scope, element) {
              // Element could be undefined if a new element is shown before
              // the old one finishes compiling.
              return element && $animate.leave(element) || $q.when();
            }
          }, options);

        }
1274281
function transformWithTransition(element, transition) {
        // transition's properties:
        // - duration: Number representing the duration of the animation in milliseconds.
        // - timing: String representing the CSS timing function that controls the progress of the animation.
        // - to: The value of *element*'s transform property after the animation.
        var duration = transition.duration * _TransitionAnimation._animationFactor;
        var transitionProperty = _BaseUtils._browserStyleEquivalents["transition"].scriptName;
        element.style[transitionProperty] = duration + "ms " + transformNames.cssName + " " + transition.timing;
        element.style[transformNames.scriptName] = transition.to;

        var finish;
        return new Promise(function (c) {
            var onTransitionEnd = function (eventObject) {
                if (eventObject.target === element && eventObject.propertyName === transformNames.cssName) {
                    finish();
                }
            };

            var didFinish = false;
            finish = function () {
                if (!didFinish) {
                    _Global.clearTimeout(timeoutId);
                    element.removeEventListener(_BaseUtils._browserEventEquivalents["transitionEnd"], onTransitionEnd);
                    element.style[transitionProperty] = "";
                    didFinish = true;
                }
                c();
            };

            // Watch dog timeout
            var timeoutId = _Global.setTimeout(function () {
                timeoutId = _Global.setTimeout(finish, duration);
            }, 50);

            element.addEventListener(_BaseUtils._browserEventEquivalents["transitionEnd"], onTransitionEnd);
        }, function () {
            finish(); // On cancelation, complete the promise successfully to match PVL
        });
    }
1354049
private Animation buildScaleAnimation(final double from, final double to, final boolean show) {

        return ParallelTransitionBuilder.create()
                                        .children(
                                                  ScaleTransitionBuilder.create()
                                                                        .node(node())
                                                                        .fromX(from)
                                                                        .toX(to)
                                                                        .fromY(from)
                                                                        .toY(to)
                                                                        .duration(Duration.seconds(1))
                                                                        .build(),

                                                  FadeTransitionBuilder.create()
                                                                       .node(node())
                                                                       .fromValue(show ? 0.0 : 1.0)
                                                                       .toValue(show ? 1.0 : 0.0)
                                                                       .duration(Duration.seconds(1))
                                                                       .build())
                                        .build();
    }
497142
public void hideWithAnimation() {
        if (transition == null || transition.getStatus().equals(Animation.Status.STOPPED)) {
            JFXAlertAnimation currentAnimation = getCurrentAnimation();
            Animation animation = currentAnimation.createHidingAnimation(getDialogPane().getContent(), getDialogPane());
            if (animation != null) {
                transition = animation;
                animation.setOnFinished(finish -> {
                    animateClosing = false;
                    hide();
                    transition = null;
                });
                animation.play();
            } else {
                animateClosing = false;
                transition = null;
                Platform.runLater(this::hide);
            }
        }
    }
1156123
function () {
            if (!this.domElement) {
                return;
            }

            if (this.conf.animateOut) {
                this._startAnimation(this.conf.animateOut, {
                    from : this.domElement,
                    type : 1
                }, true);
            } else {
                this.domElement.style.cssText = "position:absolute;display:none;overflow:auto;";
            }

            if (this.modalMaskDomElement) {

                // if there was was an animation defined we need to fade out the background for model popups
                if (this.conf.animateIn) {
                    this._getMaskAnimator().start("fade reverse", {
                        from : this.modalMaskDomElement,
                        type : 1
                    });
                } else {
                    this.modalMaskDomElement.style.cssText = "position:absolute;display:none";
                }

                if (this._containerOverflow != -1) {
                    this.popupContainer.changeContainerOverflow(this._containerOverflow);
                    this._containerOverflow = -1;
                }
            }
        }
241989
function animateElement(element, animation = '', callback = false) {
    if (!element || animation === '') {
        return false;
    }
    if (animation == 'none') {
        if (utils.isFunction(callback))
            callback()
        return false;
    }
    const animationNames = animation.split(' ')
    each(animationNames, (name) => {
        addClass(element, 'g'+name)
    })
    addEvent(animationEnd, {
        onElement: element,
        avoidDuplicate: false,
        once: true,
        withCallback: (event, target) => {
            each(animationNames, (name) => {
                removeClass(target, 'g' + name)
            })
            if (utils.isFunction(callback))
                callback()
        }
    })
}
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();
    }
25391
private static Transition makeTransitionToSelf(Pattern regex) {
    return new Transition(regex) {
      @Override
      Context computeNextContext(Context prior, Matcher matcher) {
        return prior;
      }
    };
  }
200652
function swipeOutAnimation() {
        currentTime = Date.now() - swipeOutStartTime;

        if (enableOpacity) {
            $(".itemslide_slideoutwrap").translate3d(0, currentSwipeOutPos - easeOutBack(currentTime, 0, currentSwipeOutPos - swipeOutLandPos, 250, 0)); //DURATION VELOCITY
            slides.savedSlide.css("opacity", savedOpacity - easeOutBack(currentTime, 0, savedOpacity, 250, 0) * (goback ? -1 : 1)); //Can try to remove opacity when animating width
        } else {
            //Animate slides after current swiped out slide

            if (goback) //Go back to regular (escape)
            {
                $(".itemslide_slideoutwrap").children().unwrap(); //
                $(itemslideMove).children().unwrap(); //Remove wrapper

                //Just fixing a minor issue with explorer
                slides.children().css("height", "");

                slides.end_animation = true;
                currentTime = 0;

                return;
            }

            //Before - multiply by -1 to turn to positive if before = true
            $(itemslideMove).translate3d(0 - easeOutBack(currentTime - 250, 0, 0 + slides.savedSlide.width(), 125, 0) * (before ? (-1) : 1), 0);

        }

        //Happen once every time
        if (removeWrapper == 1) {

            $(".itemslide_slideoutwrap").children().unwrap();

            //The slide changes to active

            if (slides.savedSlideIndex == vars.currentIndex) //Cool it works
                $(itemslideMove).children(':nth-child(' + (1) + ')').addClass('itemslide-active'); //Change destination index to active

            //Looks like the fix works
            if (slides.savedSlideIndex == (slides.children().length - 1) && !before && slides.savedSlideIndex == vars.currentIndex) //Is in last slide
            {
                settings.duration = 200;
                _this.anim.gotoSlideByIndex(slides.children().length - 2); //Goto last slide (we still didn't remove slide)

            }

            if (slides.savedSlideIndex == 0 && vars.currentIndex != 0) {

                currentTime = 500; //To escape this will finish animation

            }
            removeWrapper = -1;
        }
        //Change current index
        if (currentTime >= 250) {

            enableOpacity = false;

            if (removeWrapper != -1) //Happen once...
                removeWrapper = 1;

            if (currentTime >= 375) {
                $(itemslideMove).children().unwrap(); //Remove wrapper

                slides.removeSlide(prev.index()); //CAN DOO A WIDTH TRICK ;)

                if (slides.savedSlideIndex == 0 && vars.currentIndex != 0 || before) {
                    //change index instant change of active index
                    //Create function in this file to instant reposition.
                    //Or just t3d and getPositionByIndex

                    _this.anim.gotoSlideByIndex(vars.currentIndex - 1, true);

                    //Goto-slide to slide without animation
                }
                settings.duration = durationSave;
                currentTime = 0;
                slides.end_animation = true; //enables future swipe outs
                return;
            }
        }

        swipeOutGlobalID = requestAnimationFrame(swipeOutAnimation);

    }
333124
function () {
			var sPopId = this.getId() + "-popover";
			var oPopover = new Popover(sPopId, {
				showHeader: false,
				verticalScrolling: false,
				placement: "Top",
				showArrow: true,
				horizontalScrolling: false,
				content: new HBox(sPopId + "ContentBox", {
					renderType: "Bare"
				})
			});

			// Returns the duration for the Popover's closing animation.
			// It particularily concerns the setting of the focus within the contextMenu
			oPopover._getAnimationDuration = function() {
				return 0;
			};

			oPopover.attachBrowserEvent("keydown", this._changeFocusOnKeyStroke, this);
			oPopover.oPopup.attachClosed(this._popupClosed, this);
			this._oPopover = oPopover;
			oPopover.addStyleClass("sapUiDtContextMenu");

			var sPopExpId = this.getId() + "-popoverExp";
			var oPopoverExpanded = new Popover(sPopExpId, {
				showHeader: false,
				showArrow: false,
				verticalScrolling: false,
				horizontalScrolling: false,
				content: new VBox(sPopExpId + "ContentBox", {
					renderType: "Bare"
				})
			});

			// Returns the duration for the Popover's closing animation.
			// It particularily concerns the setting of the focus within the contextMenu
			oPopoverExpanded._getAnimationDuration = function() {
				return 0;
			};

			oPopoverExpanded.attachBrowserEvent("keydown", this._changeFocusOnKeyStroke, this);
			oPopoverExpanded.oPopup.attachClosed(this._popupClosed, this);
			this._oExpandedPopover = oPopoverExpanded;
			oPopoverExpanded.addStyleClass("sapUiDtContextMenu");

			oPopover.attachBrowserEvent("contextmenu", this._onContextMenu, this);
			oPopoverExpanded.attachBrowserEvent("contextmenu", this._onContextMenu, this);
			this.bOnInit = true;
		}
70376
public void animate(float animationTime, Matrix4f mat)
    {
        mRotInterpolator.animate(animationTime, mRotKey);
        mPosInterpolator.animate(animationTime, mPosKey);
        mSclInterpolator.animate(animationTime, mScaleKey);
        mat.translationRotateScale(mPosKey[0], mPosKey[1], mPosKey[2], mRotKey[0], mRotKey[1], mRotKey[2], mRotKey[3], mScaleKey[0], mScaleKey[1], mScaleKey[2]);

    }
375323
function animate() {
    var diff = this.speed;

    //
    // If we're getting close to the endpoint stop at 0.
    //
    if (this.delta < diff) {
      clearInterval(this.animated);
      diff = this.delta;
    }

    //
    // Keep track of how much is scrolled.
    //
    this.delta = this.delta - diff;
    this.y = this.y + diff * this.direction;

    //
    // Animate the scroll position.
    //
    window.scrollTo(0, this.y);
  }
212244
function transition() {
    var ts = this.__transitions__, i, len;

    if (!ts || ts.length === 0) { return; }

    for (i = 0, len = ts.length; i < len; i++) {
      enter.call(ts[i].pivot, ts[i].states, ts[i].opts);
    }

    this.__transitions__ = [];
  }
371665
private void swapAnimator(ViewPositionAnimator old, ViewPositionAnimator next) {
        final float position = old.getPosition();
        final boolean isLeaving = old.isLeaving();
        final boolean isAnimating = old.isAnimating();

        if (GestureDebug.isDebugAnimator()) {
            Log.d(TAG, "Swapping animator for " + getRequestedId());
        }

        cleanupAnimator(old);

        if (getFromView() != null) {
            next.enter(getFromView(), false);
        } else if (getFromPos() != null) {
            next.enter(getFromPos(), false);
        }

        initAnimator(next);

        next.setState(position, isLeaving, isAnimating);
    }
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()
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();
    }