Create the view
The renderer accepts the neutral objects from the loader and keeps the GPU device, camera, and selection loop inside one object.
import { loadPointCloud } from '@voxelkloud/loader'
import { createPointCloudView } from '@voxelkloud/view'
const { source, tree, openPoints } = await loadPointCloud('/pointclouds/autzen/')
const view = createPointCloudView({
canvas,
lod: { targetScreenError: 1.35, pointBudget: 3_000_000 },
})
await view.init()
view.addCloud(source, tree, openPoints)
view.frameCloud()