Read tiled 3D worlds one payload at a time.
Read tiled 3D worlds one payload at a time. Tiles3DLoader parses 3D Tiles tilesets and their renderable content, then delegates linked glTF, Draco, image, and texture payloads to the appropriate loaders. Use it directly for parsing or with Tiles3DSource for view-driven traversal.
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 3D Tiles path
Read the tileset. Resolve content. Decode the renderable payload.
A 3D Tiles dataset is a hierarchy plus content resources. The loader handles the format boundary; the tiles runtime decides which content should be requested for a view.
Input
Tileset JSON or binary tile content
Hierarchy
Tiles, bounding volumes, and refinement
Subloaders
glTF, Draco, images, and textures
Output
Tileset metadata or decoded tile content
Parses a 3D Tiles tileset.
The loader also provides experimental, automatically detected support for the explicit hierarchy in the draft glTF-based 3D Tiles 2.0 representation. This is a loader and traversal capability; it does not add renderer-level vector styling, clipping, or drawing.
| Tiles3DLoader | |
|---|---|
| File Extensions | .b3dm,.i3dm, .pnts, .cmpt |
| File Type | Binary (with linked assets) |
| File Format | 3D Tiles |
| Data Format | Data Formats (see below) |
| Decoder Type | Asynchronous |
| Worker Thread | ❌ No |
| Streaming Support | ❌ No * |
| Subloaders | DracoLoader (.pnts), GLTFLoader (.b3dm, .i3dm), ImageLoader (.jpg, .png), TextureLoader (.ktx) |
* Streaming individual tile contents is not supported; however, tilesets are streamed so that only the tiles needed for the specified viewports are loaded.
Usage
Detailed guide
Loader and payload details
The reference below covers direct parsing, tileset traversal, validation, options, linked assets, and supported content types.
As a tileset contains multiple file formats, Tiles3DLoader is needed to be explicitly specified when using load.
Load a tileset file.
import {load} from '@loaders.gl/core';
import {Tiles3DLoader} from '@loaders.gl/tiles-3d/3d-tiles';
const tilesetUrl = 'https://assets.ion.cesium.com/43978/tileset.json';
const tilesetJson = await load(tilesetUrl, Tiles3DLoader);
Draco-compressed content is decoded while supported tile content is parsed. For a Draco-compressed point-cloud tile, the nested Draco options control the returned representation:
import {load} from '@loaders.gl/core';
import {Tiles3DLoader} from '@loaders.gl/tiles-3d/3d-tiles';
const tileUrl = 'https://assets.ion.cesium.com/43978/1.pnts';
const tile = await load(tileUrl, Tiles3DLoader, {draco: {shape: 'mesh'}});
For a tile containing Draco-compressed glTF geometry, pass the glTF options through the 3D Tiles loader:
const tile = await load(tileUrl, Tiles3DLoader, {
'3d-tiles': {loadGLTF: true},
gltf: {decompressMeshes: true}
});
Load a tileset and dynamically load/unload tiles based on viewport with helper class Tileset3D (@loaders.gl/tiles)
import {Tiles3DSource} from '@loaders.gl/tiles-3d/3d-tiles';
import {Tileset3D} from '@loaders.gl/tiles-3d/tileset';
import {Tiles3DLoader} from '@loaders.gl/tiles-3d/3d-tiles';
import {WebMercatorViewport} from '@deck.gl/core';
const tilesetUrl = 'https://assets.ion.cesium.com/43978/tileset.json';
const source = new Tiles3DSource({url: tilesetUrl, loader: Tiles3DLoader});
const tileset = new Tileset3D(source, {
throttleRequests: false,
onTileLoad: (tile) => console.log(tile)
});
const viewport = new WebMercatorViewport({
width: 600,
height: 400,
latitude: 40.7067584,
longitude: -74.0115413,
zoom: 17
});
await tileset.selectTiles(viewport);
// visible tiles
const visibleTiles = tileset.tiles.filter((tile) => tile.selected);
// Note that visibleTiles will likely not immediately include all tiles.
// Content continues loading and onTileLoad fires as resources become ready.
// Call selectTiles again whenever the viewport changes.
Tileset Metadata Validation
Tiles3DLoader validates raw tileset JSON before normalizing the header or loading tile content.
Applications can use the same Zod schema directly:
import {Tiles3DTilesetSchema} from '@loaders.gl/tiles-3d/3d-tiles/tileset-zod-schema';
const validatedTileset = Tiles3DTilesetSchema.parse(tilesetJson);
The equivalent generated JSON Schema is published as
@loaders.gl/tiles-3d/3d-tiles/tileset.schema.json for editors, build tools, and non-TypeScript validators.
Both schemas enforce the same structural constraints, including that a tileset cannot define both
schema and schemaUri.
Options
| Option | Type | Default | Description |
|---|---|---|---|
3d-tiles.isTileset | boolean | 'auto' | 'auto' | Select tileset-header or render-content parsing. Auto-detection uses binary magic and JSON structure rather than trusting the URL extension. |
3d-tiles.loadGLTF | boolean | true | Parse embedded glTF binaries and linked glTF resources in b3dm and i3dm content. |
3d-tiles.decodeQuantizedPositions | boolean | false | Decode quantized point positions on the CPU when the renderer does not handle them directly. |
3d-tiles.maximumCachedSubtrees | number | 32 | Limit settled implicit-subtree resources retained by each 3D Tiles source. 0 retains only in-flight requests for deduplication. |
3d-tiles.assetGltfUpAxis | 'x' | 'y' | 'z' | null | null | Override the up axis used when interpreting linked glTF assets. |
General request options such as headers are supplied through the shared loaders.gl options. When
3d-tiles.loadGLTF is enabled, use GLTFLoader options
under options.gltf to control linked scene resources.
Standard linked raster images are decoded through ImageLoader.
See Resource resolution and content detection for extensionless and signed URLs, nested tilesets, inherited query parameters, archive sources, validation behavior, and troubleshooting.
Overridable subloaders
Tiles3DLoader declares the following direct dependencies. Core preload() prepares them
recursively and accepts replacements through the flat core.subloaders map.
| Override name | Default implementation | Purpose and compatibility |
|---|---|---|
GLTFLoader | GLTFLoader | Parse glTF tile content and linked resources. Replacements must support asynchronous parsing of JSON and binary glTF and return the compatible glTF scene structure. |
GLBLoader | GLBLoader | Inspect GLB containers when classifying tile content. Replacements must support synchronous GLB parsing and expose the compatible JSON chunk. |
import {preload, parse} from '@loaders.gl/core';
import {Tiles3DLoader} from '@loaders.gl/tiles-3d/3d-tiles';
const loader = await preload(Tiles3DLoader, {
core: {subloaders: {GLTFLoader: CustomGLTFLoader}},
gltf: {loadImages: false}
});
const tile = await parse(tileBytes, loader);
CustomGLTFLoader is an application-supplied compatible loader. The same override map passes
through nested dependencies; ordinary glTF settings remain under options.gltf. Resolved
parser bindings are separate from the caller's map. See Named subloaders
for recursive forwarding, option precedence, and the local-execution requirement for prepared graphs.
Dependency pages describe their own declared subloaders; undeclared dependencies cannot be
replaced through this map.
Notes about Tile Types
b3dm, i3dm
The Batched 3D Model and Instanced 3D Model tile types contain an embedded glTF file. This can be parsed into a hierarchical scene graph description that can be used to instantiate an actual scene graph in most WebGL libraries.
Can load both binary .glb files and JSON .gltf files.
glTF content extension
3DTILES_content_gltf extension is supported. This extension allows a tileset to use glTF 2.0 assets directly as tile content. Both glTF JSON and GLB binary formats are supported.
Experimental glTF-based tilesets and vector content
3DTILES_tileset resources are detected from their glTF structure, including for GLB, signed,
and extensionless URLs. Explicit glTF node hierarchies are adapted to the normal Tileset3D
header model. URI-backed external assets and buffer-view package files stay lazy until their tile
is requested; embedded glTF assets can resolve sibling package files by files[*].name.
Normalized tilesets expose formatVersion, with the values '0.0', '1.0', '1.1', or
'2.0-draft'. A draft tileset keeps its original glTF asset metadata, so its
asset.version remains '2.1'.
The 3D Tiles 1.1 3DTILES_content_gltf_vector preview and draft 2.0
3DTILES_tileset_vectors designation both produce Tiles3DVectorContent when glTF parsing is
enabled. Loaded tile content exposes it as content.vectorContent, and Tile3D.vectorContent
points to the primary decoded descriptor. Each primitive is discriminated as points,
polylines, or polygons; the descriptor retains its decoded glTF primitive and the topology
produced by KHR_mesh_primitive_restart or EXT_mesh_polygon. The clip flag is metadata for a
renderer and does not cause visual clipping in loaders.gl.
Draft implicit tiling accepts glTF-based 3DTILES_subtree resources with QUADTREE or OCTREE
availability. Tile/content attributes can override generated bounds, geometric error, refinement,
and transforms. Structural-metadata rows are exposed as metadata and can supply URI-template
values; templates resolve content properties before tile properties and coordinates.
Draft geometric errors remain in their declared world units, while the established 1.x path keeps
transform scaling for backward compatibility.
This experimental profile is intentionally loader/runtime-only. It does not implement voxels,
layers, visibility extensions, horizon-occlusion optimization, styling, visual clipping,
wide-line tessellation, terrain draping, or terrain/tileset clamping. clip is exposed as source
metadata, and applications remain responsible for rendering every vector primitive.
Data Format
Loaded data conforms to the 3D Tiles loader category specification with the following exceptions.
Tileset Object
| Field | Type | Contents |
|---|---|---|
type | String | Value is TILES3D. Indicates the returned object is a Cesium 3D Tiles tileset. |
lodMetricType | String | Root's Level of Detail (LoD) metric type, which is used to decide if a tile is sufficient for the current viewport. 3D Tiles uses geometricError. |
lodMetricValue | Number | Root's level of detail (LoD) metric value. |
formatVersion | String | Normalized source version: 0.0, 1.0, 1.1, or experimental 2.0-draft. |
Tile Object
The following fields are guaranteed. Additionally, the loaded tile object will contain all the data fetched from the provided url.
| Field | Type | Contents |
|---|---|---|
id | String | Identifier of the tile, unique in a tileset |
refine | String | Refinement type of the tile, ADD or REPLACE |
type | String | Type of the tile, one of pointcloud (.pnts), scenegraph (.i3dm, .b3dm, .glb, .gltf) |
boundingVolume | Object | A bounding volume in Cartesian coordinates that encloses a tile or its content. Exactly one box, region, or sphere property is required. (Reference) |
lodMetricType | String | Level of Detail (LoD) metric type, which is used to decide if a tile is sufficient for the current viewport. 3D Tiles uses geometricError. |
lodMetricValue | String | Level of Detail (LoD) metric value. |
children | Array | An array of objects that define child tiles. Each child tile content is fully enclosed by its parent tile's bounding volume and, generally, has more details than parent. for leaf tiles, the length of this array is zero, and children may not be defined. |
transformMatrix | Number[16] | A matrix that transforms from the tile's local coordinate system to the parent tile's coordinate system—or the tileset's coordinate system in the case of the root tile |
Tile Content
After content is loaded, the following fields are guaranteed. But different tiles may have different extra content fields.
| Field | Type | Contents |
|---|---|---|
cartesianOrigin | Number[3] | "Center" of tile geometry in WGS84 fixed frame coordinates |
cartographicOrigin | Number[3] | "Origin" in lng/lat (center of tile's bounding volume) |
modelMatrix | Number[16] | Transforms tile geometry positions to fixed frame coordinates |
attributes | Object | Typed arrays and attribute descriptors for decoded geometry. |
featureIds | Uint32Array | An array of feature ids which specify which feature each vertex belongs to. Can be used for picking functionality. |
vectorContent | Tiles3DVectorContent | Experimental point, polyline, and polygon topology plus the source clip flag when content is designated as vector data. |
Decoded point clouds expose topology: 'point-list'. Their attributes use the
typed array to identify scalar storage.
| Field | Contents |
|---|---|
attributes.positions | XYZ typed array or a {value, size, normalized} descriptor for quantized positions. |
attributes.normals | XYZ typed array or a {value, size} descriptor. |
attributes.colors | RGB or RGBA {value, size, normalized} descriptor, with componentType: 'float16' for half-float colors. |
PointCloud Fields
| Field | Type | Contents |
|---|---|---|
pointCount | Number | Number of points |
color | Number[3] or Number[4] | Color of the tile when there are not attributes.colors |
Scenegraph Fields
| Field | Type | Contents |
|---|---|---|
gltf | Object | See the GLTFLoader reference for linked scene content. |
Decoded glTF content
When 3d-tiles.loadGLTF is enabled, tile.gltf is a GLTFWithBuffers container. Its .json member
retains glTF indices; .buffers and .images hold loaded resources. Use
getGLTFAccessorValue for geometry arrays and
setGLTFAccessorValue for replacements. This applies to standalone glTF and legacy B3DM/I3DM
containers. Deferred content continues to expose gltfArrayBuffer.
