Socket
Book a DemoInstallSign in
Socket

sparse-octree

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sparse-octree

A sparse octree data structure.

Source
npmnpm
Version
2.3.2
Version published
Weekly downloads
361
-61.02%
Maintainers
1
Weekly downloads
 
Created
Source

Sparse Octree

Build status npm version Dependencies

A sparse octree data structure for three.js.

Extensive Demo :: API Reference

Installation

$ npm install sparse-octree

Usage

// Attention: Three is not yet an ES6 module!
import { Vector3 } from "three";
import { PointOctree } from "sparse-octree";

const min = new Vector3(-1, -1, -1);
const max = new Vector3(1, 1, 1);

const octree = new PointOctree(min, max);

octree.add(new Vector3(0, 0, 0), {});
octree.fetch(new Vector3(0, 0, 0)); // {}

A full scene setup can be found here.

Features

  • Base Functionality
    • Handles octant splitting
    • Adheres to a common octant layout
    • Supports raycasting
    • Supports culling
    • Supports cubic octrees
    • Can be extended to manage any data
  • Provides a point management implementation
  • Provides a helper that can visualise octrees

Contributing

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

Keywords

partition

FAQs

Package last updated on 19 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts