import{__extends as t}from"tslib";import{EventEmitter as i}from"events";import r from"./State";var o=function(i){function o(){var t=i.call(this)||this;return t.loop=function(i){void 0===i&&(i=0),!1===r.t?t.i("tick",i):!0===r.t&&!0===r.o||(!0===r.t&&!1===r.o&&1==r.m?t.i("tick",i):!0===r.t&&!1===r.o&&1==r.u&&t.i("tick",i)),requestAnimationFrame(t.loop)},t.loop(),t}return t(o,i),o}(i);export default o;