Scalar Mine is a browser-based terrain mining prototype built with Svelte, Vite, and Three.js. It generates chunked scalar-field terrain, lets you dig smooth holes into the ground, and remeshes edited chunks in the background with a worker pool.
The terrain is SDF-like: solid ground and empty space are represented as a density field, and digging subtracts smooth spherical edits from that field. Chunks are rebuilt from the density == 0 surface, which avoids mesh boolean artifacts and keeps holes clean.
- Infinite-feeling chunked terrain around the player
- Smooth spherical digging with a visible brush preview
- Capsule character movement and terrain collision
- Camera collision that avoids clipping through the ground
- Background chunk meshing with
?pool=falseavailable for sync-mode debugging
WASDmoveSpacejumpShiftsprint- Mouse move to look after pointer lock
- Left click dig
- Mouse wheel changes brush size
Shift+ mouse wheel zooms the camera
npm install
npm run devOpen the local Vite URL in your browser. Use ?pool=false to disable worker pools for comparison.