voxelkloudBack to the project

DOCS / PACKAGE GUIDE

@voxelkloud/view
WebGPU renderer and scene controller

This is the layer that turns source data into pixels and keeps the scene and camera under your control.

npm install @voxelkloud/view threepublic

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()

Keep control of the scene

The view does not hide the three.js objects. You still get a camera, a scene, and the hooks needed for controls, measurements, and picking.

  • view.camera stays available for OrbitControls or your own controls.
  • view.scene is your three.js scene when you need to add overlays.
  • LOD, EDL, and render settings stay explicit rather than hidden behind a black box.