kaguranana-birthday-project/node_modules/granim/lib/pause.js

10 lines
279 B
JavaScript
Raw Normal View History

2021-12-12 21:49:32 -05:00
'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;
};