An octree visualization tool for three.js.
npm install octree-helpersh
npm install three octree-helper
`
Requirements
This helper can visualize any octree that conforms to the following protocols:
- Tree
- Node
Usage
The following example uses the sparse-octree module.
`javascript
import { Scene } from "three";
import { Octree } from "sparse-octree";
import { OctreeHelper } from "octree-helper";
const scene = new Scene();
const octree = new Octree();
const octreeHelper = new OctreeHelper(octree);
// Render the helper.
scene.add(octreeHelper);
// Set a different octree.
octreeHelper.octree = otherOctree;
// Destroy the helper geometry and rebuild.
octreeHelper.update();
// Destroy the helper geometry.
octreeHelper.dispose();
``