bool onAnimate(const SkAnimTimer& timer) override {
        fCurrTime = timer.secs() - fResetTime;
        if (fCurrTime > kDuration) {
            this->initChars();
            fResetTime = timer.secs();
            fCurrTime = 0;
        }

        return true;
    }
Ejemplo n.º 2
0
    bool onAnimate(const SkAnimTimer& timer) final {
        fBackgroundAnimationTask.wait();
        this->swapAnimationBuffers();

        const double tsec = timer.secs();
        const double dt = fLastTick ? (timer.secs() - fLastTick) : 0;
        fBackgroundAnimationTask.add(std::bind(&MovingPathText::runAnimationTask, this, tsec,
                                               dt, this->width(), this->height()));
        fLastTick = timer.secs();
        return true;
    }
Ejemplo n.º 3
0
 bool onAnimate(const SkAnimTimer& timer) override {
     fBlurSigma = get_anim_sin(timer.secs(), 100, 4, 5);
     fCircleRadius = 3 + get_anim_sin(timer.secs(), 150, 25, 3);
     return true;
 }