MVP checks / mvp (push) Waiting to run
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.
11 lines
653 B
JavaScript
11 lines
653 B
JavaScript
import {buildEditMesh} from './edit-mesh.js';
|
|
import {loadLightProperties} from './light-properties.js';
|
|
const properties=loadLightProperties();
|
|
self.onmessage=({data})=>properties.then(table=>{
|
|
const start=performance.now(),result={id:data.id,epoch:data.epoch,editJob:data.editJob,preview:true};
|
|
try {
|
|
const mesh=buildEditMesh(data,table);
|
|
self.postMessage({...result,...mesh,milliseconds:performance.now()-start},[mesh.vertices.buffer,mesh.transparent.buffer]);
|
|
} catch(error) {self.postMessage({...result,error:error.message});}
|
|
}).catch(error=>self.postMessage({id:data.id,epoch:data.epoch,editJob:data.editJob,error:error.message}));
|