/cesiumjs-3d-tiles
CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, styling, metadata, feature picking, voxels, point clouds, I3S, Gaussian splats, clipping. Use when loading 3D Tiles or Mapbox Vector Tiles, rendering KHR meshopt/CAD content, styling or
$ npx -y skills add CesiumGS/cesiumjs-skills --skill cesiumjs-3d-tiles --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cesiumjs-3d-tiles
Context preview
The summary Claude sees to decide when to auto-load this skill.
CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, styling, metadata, feature picking, voxels, point clouds, I3S, Gaussian splats, clipping. Use when loading 3D Tiles or Mapbox Vector Tiles, rendering KHR meshopt/CAD content, styling or
SKILL.md
cesiumjs-3d-tiles.SKILL.mdname: cesiumjs-3d-tiles
description: "CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, styling, metadata, feature picking, voxels, point clouds, I3S, Gaussian splats, clipping. Use when loading 3D Tiles or Mapbox Vector Tiles, rendering KHR meshopt/CAD content, styling or querying features, working with voxels or point clouds, or clipping spatial data."
CesiumJS 3D Tiles
Version baseline: CesiumJS v1.143 (ES module imports, async factory methods).
Loading a Tileset
Always use async factory methods -- never call the constructor directly.
import { Cesium3DTileset, HeadingPitchRange, Math as CesiumMath } from "cesium";
// From a URL
const tileset = await Cesium3DTileset.fromUrl(
"https://example.com/tileset.json",
{ maximumScreenSpaceError: 16 }, // lower = higher quality
);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset, new HeadingPitchRange(
0.0, CesiumMath.toRadians(-25.0), tileset.boundingSphere.radius * 2.0,
));CesiumJS 1.143 applies standalone model loading to glTF embedded in tilesets. Read the [glTF compatibility matrix](../cesiumjs-models-particles/REFERENCE.md) for automatic `KHR_meshopt_compression`, CAD extension behavior, and the unsupported planar-fill boundary.
// From Cesium ion
const tileset = await Cesium3DTileset.fromIonAssetId(75343);
viewer.scene.primitives.add(tileset);
// Google Photorealistic 3D Tiles
import { createGooglePhotorealistic3DTileset } from "cesium";
const google3D = await createGooglePhotorealistic3DTileset({
onlyUsingWithGoogleGeocoder: true,
});
viewer.scene.primitives.add(google3D);// OSM Buildings
import { createOsmBuildingsAsync } from "cesium";
const osmBuildings = await createOsmBuildingsAsync();
viewer.scene.primitives.add(osmBuildings);Key Constructor Options
| Option | Default | Purpose | |--------|---------|---------| | `maximumScreenSpaceError` | 16 | LOD quality threshold (pixels) | | `cacheBytes` | 536870912 | Tile cache trim target (bytes) | | `maximumCacheOverflowBytes` | 536870912 | Extra cache headroom | | `shadows` | ShadowMode.ENABLED | Shadow casting/receiving | | `modelMatrix` | Matrix4.IDENTITY | Root transform | | `clippingPlanes` | undefined | ClippingPlaneCollection | | `clippingPolygons` | undefined | ClippingPolygonCollection (WebGL 2) | | `enableCollision` | false | Camera collision with tileset surface | | `pointCloudShading` | undefined | Point attenuation options object | | `classificationType` | undefined | TERRAIN, CESIUM_3D_TILE, or BOTH | | `dynamicScreenSpaceError` | true | Horizon LOD optimization | | `foveatedScreenSpaceError` | true | Center-screen tile priority | | `preloadFlightDestinations` | true | Prefetch tiles at flight target | | `featureIdLabel` | "featureId_0" | EXT_mesh_features ID set label | | `backFaceCulling` | true | Cull back faces per glTF material | | `edgeDisplayMode` | EdgeDisplayMode.SURFACES_ONLY | Render glTF edge-visibility data when present |
Mapbox Vector Tiles as Runtime 3D Tiles (Experimental, 1.142+)
`MVTDataProvider` loads `{z}/{x}/{y}` Mapbox Vector Tile `.mvt`/`.pbf` templates and converts tile payloads into runtime 3D Tiles. Use it when vector data is naturally tiled and you want 3D Tiles styling, metadata picking, and LOD instead of a single GeoJSON primitive.
For one in-memory or URL-backed GeoJSON object, prefer `GeoJsonPrimitive` in `cesiumjs-primitives`. For Entity/DataSource conveniences, prefer `GeoJsonDataSource` in `cesiumjs-entities`.
import {
Cesium3DTileStyle,
MVTDataProvider,
Rectangle,
} from "cesium";
const provider = await MVTDataProvider.fromUrl(
"https://example.com/tiles/{z}/{x}/{y}.pbf",
{
minZoom: 4,
maxZoom: 14,
extent: Rectangle.fromDegrees(-125, 24, -66, 50),
featureIdProperty: "id",
},
);
viewer.scene.primitives.add(provider);
// The provider owns a generated Cesium3DTileset.
provider.tileset.style = new Cesium3DTileStyle({
color: {
conditions: [
["${kind} === 'park'", "color('seagreen', 0.65)"],
["${kind} === 'water'", "color('steelblue', 0.55)"],
["true", "color('white', 0.45)"],
],
},
});Feature properties are encoded as `EXT_structural_metadata`, so standard 3D Tiles styling and picking patterns apply:
const picked = viewer.scene.pick(windowPosition);
if (picked && typeof picked.getProperty === "function") {
console.log(picked.getProperty("name"));
}Notes:
- URL templates must contain `{z}`, `{x}`, and `{y}` placeholders; tile URLs are parsed from `/z/x/y`.
- Empty 204/404 tiles are treated as missing instead of hard failures.
- `provider.show` proxies visibility to the generated tileset.
- Runtime vector glTF content uses draft `EXT_mesh_polygon` and `3DTILES_content_gltf_vector` support; treat this path as experimental.
Tileset Events
tileset.loadProgress.addEventListener((pending, processing) => {
if (pending === 0 && processing === 0) console.log("Loaded");
});
tileset.initialTilesLoaded.addEventListener(() => { /* first view ready */ });
tileset.allTilesLoaded.addEventListener(() => { /* all visible tiles ready */ });
tileset.tileLoad.addEventListener((tile) => { /* tile content loaded */ });
tileset.tileUnload.addEventListener((tile) => { /* tile evicted from cache */ });
tileset.tileFailed.addEventListener(({ url, message }) => {
console.error(`Tile ${url}: ${message}`);
});
// Per-frame manual styling
tileset.tileVisible.addEventListener((tile) => {
const content = tile.content;
for (let i = 0; i < content.featuresLength; i++) {
content.getFeature(i).color = Cesium.Color.fromRandom();
}
});Runtime Properties
tileset.show = false; // toggle visibility
tileset.maximumScreenSpaceError = 8; // increase quality
const { center, radius } = tileset.boundingSphere;
import { Matrix4, Cartesian3 } from "cesium";
tileset.modelMatrix = Matrix4.fromTranslation(new CaRead more
name: cesiumjs-3d-tiles description: "CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, styling, metadata, feature picking, voxels, point clouds, I3S, Gaussian splats, clipping. Use when loading 3D Tiles or Mapbox Vector Tiles, rendering KHR meshopt/CAD content, styling or querying features, working with voxels or point clouds, or clipping spatial data."
CesiumJS 3D Tiles
Version baseline: CesiumJS v1.143 (ES module imports, async factory methods).
Loading a Tileset
Always use async factory methods -- never call the constructor directly.
import { Cesium3DTileset, HeadingPitchRange, Math as CesiumMath } from "cesium";
// From a URL
const tileset = await Cesium3DTileset.fromUrl(
"https://example.com/tileset.json",
{ maximumScreenSpaceError: 16 }, // lower = higher quality
);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset, new HeadingPitchRange(
0.0, CesiumMath.toRadians(-25.0), tileset.boundingSphere.radius * 2.0,
));CesiumJS 1.143 applies standalone model loading to glTF embedded in tilesets. Read the [glTF compatibility matrix](../cesiumjs-models-particles/REFERENCE.md) for automatic `KHR_meshopt_compression`, CAD extension behavior, and the unsupported planar-fill boundary.
// From Cesium ion const tileset = await Cesium3DTileset.fromIonAssetId(75343); viewer.scene.primitives.add(tileset);
// Google Photorealistic 3D Tiles
import { createGooglePhotorealistic3DTileset } from "cesium";
const google3D = await createGooglePhotorealistic3DTileset({
onlyUsingWithGoogleGeocoder: true,
});
viewer.scene.primitives.add(google3D);// OSM Buildings
import { createOsmBuildingsAsync } from "cesium";
const osmBuildings = await createOsmBuildingsAsync();
viewer.scene.primitives.add(osmBuildings);Key Constructor Options
| Option | Default | Purpose | |--------|---------|---------| | `maximumScreenSpaceError` | 16 | LOD quality threshold (pixels) | | `cacheBytes` | 536870912 | Tile cache trim target (bytes) | | `maximumCacheOverflowBytes` | 536870912 | Extra cache headroom | | `shadows` | ShadowMode.ENABLED | Shadow casting/receiving | | `modelMatrix` | Matrix4.IDENTITY | Root transform | | `clippingPlanes` | undefined | ClippingPlaneCollection | | `clippingPolygons` | undefined | ClippingPolygonCollection (WebGL 2) | | `enableCollision` | false | Camera collision with tileset surface | | `pointCloudShading` | undefined | Point attenuation options object | | `classificationType` | undefined | TERRAIN, CESIUM_3D_TILE, or BOTH | | `dynamicScreenSpaceError` | true | Horizon LOD optimization | | `foveatedScreenSpaceError` | true | Center-screen tile priority | | `preloadFlightDestinations` | true | Prefetch tiles at flight target | | `featureIdLabel` | "featureId_0" | EXT_mesh_features ID set label | | `backFaceCulling` | true | Cull back faces per glTF material | | `edgeDisplayMode` | EdgeDisplayMode.SURFACES_ONLY | Render glTF edge-visibility data when present |
Mapbox Vector Tiles as Runtime 3D Tiles (Experimental, 1.142+)
`MVTDataProvider` loads `{z}/{x}/{y}` Mapbox Vector Tile `.mvt`/`.pbf` templates and converts tile payloads into runtime 3D Tiles. Use it when vector data is naturally tiled and you want 3D Tiles styling, metadata picking, and LOD instead of a single GeoJSON primitive.
For one in-memory or URL-backed GeoJSON object, prefer `GeoJsonPrimitive` in `cesiumjs-primitives`. For Entity/DataSource conveniences, prefer `GeoJsonDataSource` in `cesiumjs-entities`.
import {
Cesium3DTileStyle,
MVTDataProvider,
Rectangle,
} from "cesium";
const provider = await MVTDataProvider.fromUrl(
"https://example.com/tiles/{z}/{x}/{y}.pbf",
{
minZoom: 4,
maxZoom: 14,
extent: Rectangle.fromDegrees(-125, 24, -66, 50),
featureIdProperty: "id",
},
);
viewer.scene.primitives.add(provider);
// The provider owns a generated Cesium3DTileset.
provider.tileset.style = new Cesium3DTileStyle({
color: {
conditions: [
["${kind} === 'park'", "color('seagreen', 0.65)"],
["${kind} === 'water'", "color('steelblue', 0.55)"],
["true", "color('white', 0.45)"],
],
},
});Feature properties are encoded as `EXT_structural_metadata`, so standard 3D Tiles styling and picking patterns apply:
const picked = viewer.scene.pick(windowPosition);
if (picked && typeof picked.getProperty === "function") {
console.log(picked.getProperty("name"));
}Notes:
- URL templates must contain `{z}`, `{x}`, and `{y}` placeholders; tile URLs are parsed from `/z/x/y`.
- Empty 204/404 tiles are treated as missing instead of hard failures.
- `provider.show` proxies visibility to the generated tileset.
- Runtime vector glTF content uses draft `EXT_mesh_polygon` and `3DTILES_content_gltf_vector` support; treat this path as experimental.
Tileset Events
tileset.loadProgress.addEventListener((pending, processing) => {
if (pending === 0 && processing === 0) console.log("Loaded");
});
tileset.initialTilesLoaded.addEventListener(() => { /* first view ready */ });
tileset.allTilesLoaded.addEventListener(() => { /* all visible tiles ready */ });
tileset.tileLoad.addEventListener((tile) => { /* tile content loaded */ });
tileset.tileUnload.addEventListener((tile) => { /* tile evicted from cache */ });
tileset.tileFailed.addEventListener(({ url, message }) => {
console.error(`Tile ${url}: ${message}`);
});
// Per-frame manual styling
tileset.tileVisible.addEventListener((tile) => {
const content = tile.content;
for (let i = 0; i < content.featuresLength; i++) {
content.getFeature(i).color = Cesium.Color.fromRandom();
}
});Runtime Properties
tileset.show = false; // toggle visibility
tileset.maximumScreenSpaceError = 8; // increase quality
const { center, radius } = tileset.boundingSphere;
import { Matrix4, Cartesian3 } from "cesium";
tileset.modelMatrix = Matrix4.fromTranslation(new CaShowing the first part of this file.
Curated agent skills for CesiumJS development — 14 domain skills covering ~551 public symbols across the CesiumJS v1.143 API surface.
Repo: CesiumGS/cesiumjs-skills
Other skills on cesiumjs-skills.
- /cesiumjs-camera
CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, CameraEventAggregator, flight animation. Use when positioning the camera, creating flyTo animations, constraining user navigation, tracking entities, or converting between screen and world
Open skill - /cesiumjs-core-utilities
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility
Open skill - /cesiumjs-custom-shader
CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czm_modelMaterial. Use when reading EXT_mesh_features or EXT_structural_metadata property textures/tables, vertex displacement, or shading VoxelPrimitive.
Open skill - /cesiumjs-entities
CesiumJS entities and data sources - Entity, EntityCollection, DataSource, GeoJsonDataSource, KmlDataSource, CzmlDataSource, Graphics types, PathGraphics, PathMode, Visualizers. Use when adding points, labels, models, polygons, polylines, or time-segmented paths, loading
Open skill - /cesiumjs-imagery
CesiumJS imagery layers - ImageryProvider, ImageryLayer, ImageryLayerCollection, WMS, WMTS, Bing, OpenStreetMap, ArcGIS, Mapbox, tile discard policies. Use when adding or swapping base map layers, configuring imagery providers, layering multiple map sources, or creating
Open skill - /cesiumjs-interaction
CesiumJS interaction and picking - ScreenSpaceEventHandler, multi-key KeyboardEventModifier input actions, Scene.pick, Scene.drillPick, Scene.pickPosition, mouse and touch events. Use when handling user clicks on the globe, selecting entities or 3D Tiles features, registering
Open skill

