1 line
2.5 KiB
JavaScript
1 line
2.5 KiB
JavaScript
import{_ as d,s as p,p as e,a as o,l as T,D as l,b as m,g as u}from"./index.ff029041.js";import"./vue.35fd3bc4.js";import{b3 as c}from"./@vue.41db58fd.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.f2f3b7cf.js";import"./@ivanv.f5f393ce.js";import"./vue-next-select.b7da6f19.js";import"./vuedraggable.2a65e8c7.js";import"./earcut.b6f90e68.js";import"./sortablejs.4c7e7419.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-toastification.1c45a88e.js";import"./@pixi.13a16b18.js";import"./ismobilejs.5c6954b9.js";import"./eventemitter3.dc5195d7.js";import"./url.6dd57c6c.js";import"./querystring.776b9ab3.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(o.lastTenTicks.push(r),o.lastTenTicks.length>10&&(o.lastTenTicks=o.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!o.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),l.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||l.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!l.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function E(){f=(await d(()=>import("./index.ff029041.js").then(function(t){return t.c}),["assets/index.ff029041.js","assets/index.c60e2430.css","assets/@fontsource.f66d05e7.css","assets/vue.35fd3bc4.js","assets/earcut.b6f90e68.js","assets/@vue.41db58fd.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/@ivanv.f5f393ce.js","assets/vue-next-select.b7da6f19.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.2a65e8c7.js","assets/sortablejs.4c7e7419.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.1c45a88e.js","assets/vue-toastification.4b5f8ac8.css","assets/@pixi.13a16b18.js","assets/ismobilejs.5c6954b9.js","assets/eventemitter3.dc5195d7.js","assets/url.6dd57c6c.js","assets/querystring.776b9ab3.js","assets/workbox-window.8d14e8b7.js"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{E as startGameLoop};
|