octree-helper

1.1.6 • Public • Published

Octree Helper

Build status npm version Peer dependencies

An octree visualization tool for three.js.

Demo · Documentation

Installation

This library requires the peer dependency three.

npm install three octree-helper

Requirements

This helper can visualize any octree that conforms to the following protocols:

Usage

The following example uses the sparse-octree module.

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

Contributing

Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Dependents (0)

Package Sidebar

Install

npm i octree-helper

Weekly Downloads

11

Version

1.1.6

License

Zlib

Unpacked Size

21 kB

Total Files

6

Last publish

Collaborators

  • vanruesc