three-las
A three.js loader for lidar point clouds: LAS, LAZ and COPC.
Demo
Install
npm install three-las
Use
import { LASLoader } from 'three-las'
const loader = new LASLoader().setDecoderPath('/decoders/')
const points = await loader.loadAsync('survey.copc.laz')
scene.add(points)
For LAZ and COPC, copy laz-perf.wasm from node_modules/laz-perf/lib/web/ into the decoder path, or give the file's
own URL, as Vite does with import decoder from 'laz-perf/lib/web/laz-perf.wasm?url'.
You get one THREE.Points with position, color, intensity and classification, placed at the file's offset, Z up.
A COPC file loads its coarsest levels first, up to maxPoints (2,000,000).
License
MIT