import{onNextFrame as e,defaultTimestep as r}from"./on-next-frame.js";import{createRenderStep as t}from"./create-render-step.js";var n=!0,u=!1,o=!1,c={delta:0,timestamp:0},a=["read","update","preRender","render","postRender"],i=a.reduce((function(e,r){return e[r]=t((function(){return u=!0})),e}),{}),d=a.reduce((function(e,r){var t=i[r];return e[r]=function(e,r,n){return void 0===r&&(r=!1),void 0===n&&(n=!1),u||s(),t.schedule(e,r,n)},e}),{}),f=a.reduce((function(e,r){return e[r]=i[r].cancel,e}),{}),m=function(e){return i[e].process(c)},p=function(t){u=!1,c.delta=n?r:Math.max(Math.min(t-c.timestamp,40),1),c.timestamp=t,o=!0,a.forEach(m),o=!1,u&&(n=!1,e(p))},s=function(){u=!0,n=!0,o||e(p)},l=function(){return c};export default d;export{f as cancelSync,l as getFrameData};
//# sourceMappingURL=index.js.map
