Seedforge: Procedural Dungeons, Caves, Mazes and Islands from a Seed
README.md
procLevelKit.build
Turns level data into a playable level: floors, walls, water, trees, props and markers merged into one runtime mesh per surface (UVs at each material's real tile size), one CompoundCollider of merged boxes (plus a HeightfieldCollider for the island), point lights for torches, crystals, start and exit, and loot chests as separate entities so each can be taken. Everything is temporary and unsynced under one root, so every peer builds the same level locally and clear() removes all of it. Returns the level handle (cellToWorld, startPosition, spawnPoints, lootPoints, isAtExit, takeLoot, setTheme, onClear, clear). A surface whose library material has not arrived yet (on the web, collections can still be loading) is drawn in its theme colour meanwhile, and the handle rebuilds its look as soon as the material resolves (materialWait seconds, default 120). B.materialSource swaps the material library. Called by ProcLevel.build / ProcLevel.generate.