voxelkloudBack to the project

DOCS / PACKAGE GUIDE

@voxelkloud/wasm-core
Low-level LOD kernels

This module graph is plain arrays and numbers, which keeps it importable where the renderer itself is too heavy.

npm install @voxelkloud/wasm-corepublic

Load the kernels

Use the wasm bundle when you want the selection math without the rest of the renderer attached.

import { Param, loadWasmKernels } from '@voxelkloud/wasm-core'

const kernels = await loadWasmKernels(wasmBytes)
kernels.params[Param.CamX] = camera.x
kernels.params[Param.CamY] = camera.y
kernels.extractPlanes(false, false)
const mask = kernels.selectChildren(0xff, false)

When to reach for it

This is the seam the renderer cuts along when it wants the same math in a worker or in a non-DOM environment.

  • No DOM dependency.
  • No three.js dependency.
  • Good for worker-side selection or SSR plumbing.

Related guides