This commit is contained in:
33333-33333 2026-05-29 22:00:42 +09:00
commit 6cef9a3abe
11 changed files with 1184 additions and 235 deletions

11
mapPatchWorker.js Normal file
View file

@ -0,0 +1,11 @@
import { generatePatch } from "./mapPatch.js";
self.onmessage = (event) => {
const { id, world, rect, options } = event.data || {};
try {
const result = generatePatch(world, rect, options || {});
self.postMessage({ id, ok: true, world, result });
} catch (error) {
self.postMessage({ id, ok: false, error: error?.message || String(error), stack: error?.stack || "" });
}
};