Expand voxel gameplay, lighting, full-height streaming and world imports
MVP checks / mvp (push) Canceled after 0s
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.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { TerrainState } from './terrain-state.js';
|
||||
import { loadLightProperties } from './light-properties.js';
|
||||
|
||||
// Geometry never queues behind a whole-view lighting build.
|
||||
const state = loadLightProperties().then(properties => new TerrainState(properties));
|
||||
self.onmessage = ({data}) => state.then(terrain => {
|
||||
if (data.type === 'sync') {
|
||||
if (terrain.sync(data)) self.postMessage({type:'synced',epoch:data.epoch,version:data.version});
|
||||
} else if (data.type === 'mesh') {
|
||||
const result = terrain.meshLocal(data);
|
||||
self.postMessage(result, result.vertices ? [result.vertices.buffer,result.transparent.buffer] : []);
|
||||
}
|
||||
}).catch(error => self.postMessage({...data,type:'error',error:error.message}));
|
||||
Reference in New Issue
Block a user