10 lines
279 B
JavaScript
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;
|
|
};
|