VOXLoader

VOXLoader

Class for loading voxel data stored in VOX files.

Constructor

new VOXLoader(manager)

Create a VOXLoader.
Mixes In:
Source:
Parameters:
Name Type Description
manager LoadingManager

Extends

  • Loader

Methods

getLOD()

Get the Level Of Detail (LOD) value.
Mixes In:
Source:

load(url, onLoadopt, onProgressopt, onErroropt)

Loads and parses a VOX file from a URL.
Source:
Parameters:
Name Type Attributes Description
url String URL to the VOX file.
onLoad function <optional>
Callback invoked with the loaded object.
onProgress function <optional>
Callback for download progress.
onError function <optional>
Callback for download errors.

parse(buffer) → {Promise.<PointOctree>}

Parse VOX file data.
Source:
Parameters:
Name Type Description
buffer Buffer Content of VOX file.
Returns:
Type:
Promise.<PointOctree>
Promise with an octree filled with voxel data.

setLOD(maxPointsopt, maxDepthopt)

Set the vanted level of detail (LOD).
Mixes In:
Source:
Parameters:
Name Type Attributes Default Description
maxPoints number <optional>
1 Number of distinct points per octant in octree before it splits up.
maxDepth number <optional>
8 The maximum octree depth level, starting at 0.