Tiles runtime module
Let the viewport decide which data arrives.
The tiles module supplies source-backed 2D and 3D traversal primitives. It coordinates hierarchy selection, request scheduling, caching, and refresh while leaving the final rendering policy to the application.
View-dependent delivery
A hierarchy turns one scene into useful requests.
Tiled formats keep spatial structure and level-of-detail metadata alongside their payloads. A runtime can select visible leaves instead of downloading the complete world.
Dataset hierarchy
Current view
3D Tiles and I3S differ in their resource layouts, but the application-facing idea is the same: preserve the hierarchy, select by view, and request content progressively.
The tiles runtime
Select, request, cache, refresh.
A tileset is a data source with a hierarchy. The runtime tracks what is visible, requests the corresponding content, and releases data that is no longer useful under the configured cache policy.
Selection
Viewport, bounds, geometric error, and level of detail
Requests
Priority scheduling, cancellation, and refresh
Memory
Cache budgets and eviction of no-longer-needed content
Outputs
3D tiles, point clouds, raster tiles, and source metadata
Detailed guide
Tiles runtime details
The sections below document the tile hierarchy, traversal lifecycle, cache, coordinate model, and helper classes.
Choose a runtime
The module separates format-specific sources from the runtime that selects and manages data. Start with the class that matches the delivery problem:
| Need | Runtime | What it provides |
|---|---|---|
| Hierarchical 3D Tiles or I3S | Tileset3D | View-dependent traversal, culling, request scheduling, cache management, and selected content |
| Point-cloud octrees | PointCloudTileset | Visible-node selection and point budgets for COPC, Potree and dynamic decoded point sources |
| 2D tile grids | Tileset2D | Shared fetched content with per-consumer selection and visibility state |
| Viewport-driven rasters | RasterSet | Metadata loading, debounced raster requests, and lifecycle events |
Format-specific sources implement the source contract consumed by Tileset3D. See
Tileset3DSource,
Tiles3DSource, and
I3SSource for the source boundary.
Typical 3D flow
Create a source with the loader for the format, give it to Tileset3D, and select tiles whenever
the viewport changes. The runtime keeps the hierarchy, requests, cache, and selected set in sync.
import {WebMercatorViewport} from '@deck.gl/core';
import {Tiles3DLoader} from '@loaders.gl/tiles-3d/3d-tiles';
import {Tiles3DSource} from '@loaders.gl/tiles-3d/3d-tiles';
import {Tileset3D} from '@loaders.gl/tiles-3d/tileset';
const source = new Tiles3DSource({
url: 'https://assets.ion.cesium.com/43978/tileset.json',
loader: Tiles3DLoader
});
const tileset = new Tileset3D(source, {
onTileLoad: tile => console.log(tile)
});
const viewport = new WebMercatorViewport({
width: 800,
height: 600,
latitude: 37.7749,
longitude: -122.4194,
zoom: 12
});
await tileset.selectTiles(viewport);
const visibleTiles = tileset.selectedTiles;
Call selectTiles again when the camera changes. Tile content may continue arriving after a
selection pass, and onTileLoad reports newly ready content. Use update(viewport) only when a
fire-and-forget compatibility wrapper is preferable; new code should generally await
selectTiles.
For point clouds, use PointCloudTileset
with a COPC or Potree source and read its selectedTiles. For 2D data, use
Tileset2D; for raster services, use
RasterSet.
Decoded point datasets can also use
PointCloudTileSource to build
an additive octree in the browser, with lazy child partitions and explicit memory limits.
Shared tile model
The runtime keeps three related layers distinct:
| Layer | Carries |
|---|---|
| Source metadata | Format version, coordinate context, hierarchy references, and content URLs |
| Runtime tile | Bounds, children, refinement, level-of-detail state, selection, and content state |
| Tile content | Decoded application data, transforms, origins, attributes, and format-specific metadata |
Tile3D is the runtime record for one hierarchical tile. Its detailed lifecycle and visibility
helpers are documented in the Tile3D reference.
The 3D Tiles category specification describes the
application-facing shape for decoded tile content.
Coordinate context
Source metadata preserves the coordinate reference system and any transforms needed to place content. Depending on the source and requested options, applications may work with:
- fixed-frame Cartesian positions, typically WGS84 ECEF coordinates
- local or cartographic positions relative to a tile origin, with positions expressed in meters
I3S adds explicit horizontal and vertical placement options; see I3S coordinate reference systems and vertical coordinate systems. For 3D Tiles payload and metadata details, see the 3D Tiles format page.