1 line
2.6 KiB
JavaScript
1 line
2.6 KiB
JavaScript
import{_ as d,s as p,p as e,a as n,l as T,D as l,b as a,g as u}from"./index.624ae6e9.js";import"./vue.5bd9f35e.js";import{b1 as c}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.f2f3b7cf.js";import"./vuedraggable.832ed13e.js";import"./lru-cache.9506e0ec.js";import"./yallist.fd762fe7.js";import"./sortablejs.80af5380.js";import"./vue-next-select.8d9e0122.js";import"./vue-textarea-autosize.35804eaf.js";import"./semver.d101e2be.js";import"./socket.io-client.79ce0df5.js";import"./engine.io-client.58517560.js";import"./engine.io-parser.3f360695.js";import"./@socket.io.aec831e2.js";import"./socket.io-parser.544e37d1.js";import"./vue-toastification.b272a510.js";import"./workbox-window.8d14e8b7.js";let o=null,f=null;function m(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(n.lastTenTicks.push(r),n.lastTenTicks.length>10&&(n.lastTenTicks=n.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!n.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,a.offlineLimit*3600)&&(e.offlineTime=a.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,a.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(m),o!=null&&(clearInterval(o),o=null)):o==null&&(o=setInterval(m,50)))}}async function G(){f=(await d(()=>import("./index.624ae6e9.js").then(function(t){return t.c}),["assets/index.624ae6e9.js","assets/index.7f7e174e.css","assets/@fontsource.f66d05e7.css","assets/vue.5bd9f35e.js","assets/lru-cache.9506e0ec.js","assets/yallist.fd762fe7.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/vuedraggable.832ed13e.js","assets/sortablejs.80af5380.js","assets/vue-next-select.8d9e0122.js","assets/vue-next-select.9e6f4164.css","assets/vue-textarea-autosize.35804eaf.js","assets/semver.d101e2be.js","assets/socket.io-client.79ce0df5.js","assets/engine.io-client.58517560.js","assets/engine.io-parser.3f360695.js","assets/@socket.io.aec831e2.js","assets/socket.io-parser.544e37d1.js","assets/vue-toastification.b272a510.js","assets/vue-toastification.4b5f8ac8.css","assets/workbox-window.8d14e8b7.js"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(m):o=setInterval(m,50)}export{G as startGameLoop};
|