MVP checks / mvp (push) Canceled after 0s
Add shared Rust/WASM physics, worker meshing and diagnostics, 64-chunk full-height streaming, atlas texture support, and baseline world import. Document the current implementation and include the supplied in-game lobby screenshot.
16 lines
663 B
JavaScript
16 lines
663 B
JavaScript
import { buildBlockLight } from "./block-light.js";
|
|
|
|
self.onmessage = ({ data: request }) => {
|
|
try {
|
|
const start = performance.now();
|
|
const result = buildBlockLight(new Map(request.blocks), new Map(request.materials), request.bounds);
|
|
const { min, size, data, sourceCount, blockLevels, skyLevels } = result;
|
|
self.postMessage({ generation: request.generation,
|
|
field: { min, size, data, sourceCount, blockLevels, skyLevels },
|
|
milliseconds: performance.now() - start,
|
|
}, [data.buffer, blockLevels.buffer, skyLevels.buffer]);
|
|
} catch (error) {
|
|
self.postMessage({ generation: request.generation, error: error.message });
|
|
}
|
|
};
|