Workers for chunk generation !

This commit is contained in:
2026-10-11 01:15:14 -03:00
parent 3d2b235f64
commit cd3b39c3d7
24 changed files with 1119 additions and 91 deletions
+5
View File
@@ -16,7 +16,12 @@ export type HostToGame =
worldgen_code?: string;
shared_code?: string;
}[];
// the game's ends of channels to the worldgen workers the host started, see worldgen_pool.ts. none means
// generating on the game's thread
worldgen_ports: MessagePort[];
}
// a worldgen worker crashed and the host started it again, this is the new one's port
| { type: "worldgen_port"; index: number; port: MessagePort }
| { type: "connect"; conn: number }
| { type: "message"; conn: number; data: string }
| { type: "disconnect"; conn: number }