kaguranana-birthday-project/node_modules/granim/lib/pause.js
2021-12-12 18:49:32 -08:00

10 lines
279 B
JavaScript

'use strict';
module.exports = function(state) {
var isPausedBecauseNotInView = state === 'isPausedBecauseNotInView';
if (this.isCleared) return;
if (!isPausedBecauseNotInView) this.isPaused = true;
cancelAnimationFrame(this.animation);
this.animating = false;
};