This commit is contained in:
33333-33333 2026-06-25 17:43:24 +09:00
commit 16074232aa
40 changed files with 1509 additions and 732 deletions

View file

@ -1,4 +1,20 @@
"use strict";
function ensureWorldBootstrap() {
let currentWorld = globalThis.world;
if (currentWorld?.update) return currentWorld;
try {
currentWorld = new World();
if (typeof window !== "undefined") window.world = currentWorld;
if (typeof globalThis !== "undefined") globalThis.world = currentWorld;
return currentWorld;
} catch (error) {
if (typeof window !== "undefined") window.__worldInitError = error?.stack || String(error);
throw error;
}
}
let world = ensureWorldBootstrap();
let last = nowSec();
let statsTimer = 0;
let fpsTimer = 0;
@ -114,6 +130,7 @@ loadImages(null, (done, total) => {
setLoadingProgress("\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u69cb\u7bc9\u4e2d", 0.72);
applyFieldLayout("garden");
world.reset(null, "garden");
window.bindGroundUI?.(world);
selectTool("observe");
setLoadingProgress("\u8868\u793a\u3092\u521d\u671f\u5316\u4e2d", 0.84);
renderLog(world.logs);