voxelkloudBack to the project

DOCS / PACKAGE GUIDE

@voxelkloud/format-3dtiles
3D Tiles driver

This driver is for tileset-driven scenes. It reads the tileset document, expands explicit or implicit trees, and opens point content from point tiles.

npm install @voxelkloud/format-3dtilessource

Open a tileset

Start from the tileset document, build the tree, and let the view request point content as the camera moves.

import {
  createTilesetTree,
  loadTilesetSource,
  openTilesetPoints,
} from '@voxelkloud/format-3dtiles'

const source = await loadTilesetSource('/tileset.json')
const tree = createTilesetTree(source.tiles, {
  loadDocument: async (url, signal) =>
    fetch(url, { signal }).then((res) => res.json()),
})
const openPoints = openTilesetPoints(source)

When to use it

Pick this driver when your scene is already described as a tileset and you want the point payloads to follow that structure.

  • Useful for explicit or implicit tile trees.
  • Point content comes from .pnts tiles.
  • The selector still receives the same neutral contracts once the driver opens the source.

Related guides