a
This commit is contained in:
parent
d163ceb291
commit
f6d7412744
94 changed files with 3836 additions and 1226 deletions
12
js/main.js
12
js/main.js
|
|
@ -100,6 +100,7 @@ function loop() {
|
|||
window.TarinaiPerf.beginFrame();
|
||||
const endUpdate = window.TarinaiPerf.begin("update.total");
|
||||
world.update(dt);
|
||||
if (typeof tickColonyHistorySampling === "function") tickColonyHistorySampling();
|
||||
if (endUpdate) endUpdate();
|
||||
const endRender = window.TarinaiPerf.begin("render.total");
|
||||
render();
|
||||
|
|
@ -146,3 +147,14 @@ if ("serviceWorker" in navigator) {
|
|||
navigator.serviceWorker.register(swUrl, { updateViaCache: "none" }).catch(() => undefined);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Expose the active build on the root element so stale-cache reports can be verified immediately.
|
||||
(function markActiveBuild() {
|
||||
const apply = () => {
|
||||
if (!document?.documentElement) return;
|
||||
document.documentElement.dataset.tarinaiBuild = String(window.TARINAI_APP?.build || window.TARINAI_VERSION || "unknown");
|
||||
};
|
||||
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", apply, { once: true });
|
||||
else apply();
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue