[04]entry 4 of 29
Strata
this entry is written twice, in full
- 1.in brief
25M-point LiDAR engine in the browser
- 2.in general
A point-cloud processor that runs in a browser tab, which is not where a surveyor expects to find one.
- 3.in particular
25M+ points at 60fps in the browser via WebGPU, with a Rust/WASM LAS parser 20× faster than JS.
- 1.in brief
a 25-million-point laser survey running in a browser tab
- 2.in general
Survey software that runs in a web page, which is not where a surveyor expects to find it.
- 3.in particular
25 million measured points moving smoothly in a browser, with a file reader twenty times quicker than the usual one.
context
LiDAR point clouds (.LAS/.LAZ) from surveying run to tens of millions of points and traditionally need heavy desktop software. The goal: bring that workflow to the browser with a viewer fast enough to be useful, not a toy.
the problem
Two hard walls: parsing gigabytes of binary point data without freezing the tab, and rendering 25M+ points at interactive framerates, far past what naive WebGL draw calls can do.
what i built
- 1.
WebGPU3 compute shaders (WGSL4) cull and render 25M+ points in real time at 60fps
- 2.
A custom binary parser in Rust5 compiled to WASM streams .LAS/.LAZ 20× faster than JS, using the las/laz-rs crates
- 3.
Octree spatial indexing with a virtual chunking system that loads only visible data into VRAM
- 4.
Three render modes (RGB, intensity, elevation) switched live via uniforms
- 5.
Real-time distance/area/volume measurement via ray-casting, professional floating-panel UI in Svelte
outcome
A point-cloud viewer that runs entirely client-side: nothing to install, no server doing the work. WebGPU3, WASM and Svelte hold up under sustained GPU load, which is the argument for treating the browser as a platform rather than a document viewer.
Heavy civil-engineering point-cloud workflows, running entirely in a browser tab at 60fps.
context
A laser scan of a real site produces tens of millions of individually measured points, and working with them normally means heavy desktop software. The aim was to do it in a browser instead, and to be fast enough to actually work in rather than merely demonstrate.
the problem
Two hard walls. Reading gigabytes of survey data without the tab freezing solid, and drawing 25 million points quickly enough to move around in them, which is far past what a browser would ordinarily manage.
what i built
- 1.
The graphics card is given the job of working out what is actually visible and drawing it, which is how 25 million points stay smooth.
- 2.
A file reader written in a fast systems language and run inside the browser opens survey files about twenty times quicker than doing it the usual way.
- 3.
The scene is divided into a tree of boxes so only the part you can currently see is loaded onto the graphics card at all.
- 4.
Three ways to colour the scan, by true colour, by how strongly the laser came back, or by height, switched instantly.
- 5.
Distances, areas and volumes measured by clicking on the scan, in a proper floating-panel interface.
outcome
A survey viewer that runs entirely on your own machine inside a tab: nothing to install, and no server quietly doing the work. It holds up under sustained load, which is the argument for treating a browser as a real platform rather than as somewhere to read documents.
Heavy civil-engineering survey work, running in a browser tab without dropping a frame.