cesiumjs-primitives

Batch CesiumJS geometry instances with primitives to optimize draw calls.

112|16|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/CesiumGS/cesiumjs-skills --skill cesiumjs-primitives
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cesiumjs-primitives
Source: https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-primitives
Command: npx skills add https://github.com/CesiumGS/cesiumjs-skills --skill cesiumjs-primitives

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rendering complex, performance-critical scenes in CesiumJS can be exhausting when using high-level Entity APIs; by leveraging Primitive, GeometryInstance, and Appearance, developers can batch draw calls and render custom shapes with fine-grained control.

Core Features & Use Cases

  • Low-level rendering with Primitive, GeometryInstance, and Appearance to optimize performance for large datasets.
  • Built-in geometry types and support for custom shapes, ground primitives, and classification primitives.
  • Use cases include batching thousands of shapes, rendering terrain-draped geometry, and achieving deterministic draw calls for large scenes.

Quick Start

Instantiate a simple Primitive with a GeometryInstance in a Cesium scene and attach an appropriate Appearance to render a static shape.

Frequently Asked Questions about cesiumjs-primitives

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch render thousands of geometries in CesiumJS without dropping frame rates?

Batch render thousands of geometries in CesiumJS by grouping multiple GeometryInstance objects into a single Primitive collection. This approach reduces draw calls and optimizes scene-wide performance compared to using high-level Entity APIs for large datasets.

When should I use CesiumJS Primitives instead of Entity APIs for rendering?

Use CesiumJS Primitives instead of Entity APIs when you need low-level rendering control and scene-wide performance optimization. Primitives provide fine-grained management over GeometryInstance arrays and Appearance, making them ideal for rendering large numbers of static shapes efficiently.

What is the best way to render terrain-draped geometry in CesiumJS?

Render terrain-draped geometry in CesiumJS by utilizing ground primitives within your Primitive collection. This approach allows custom shapes to conform to the underlying terrain while maintaining the batching benefits of GeometryInstance arrays for performance-critical scenes.

Does CesiumJS Primitive support custom geometry types and appearances?

CesiumJS Primitive supports custom geometry types alongside built-in geometries through GeometryInstance configurations. You can attach appropriate Appearance objects to define the visual presentation, achieving fine-grained control over both the shape structure and its rendering pipeline.

What are the limitations of using Primitive collections for dynamic scene objects in CesiumJS?

Primitive collections in CesiumJS are optimized for static shapes and performance-critical scenes, which limits dynamic object updates. Because batching relies on grouping GeometryInstance arrays for deterministic draw calls, frequently modifying individual geometries within a Primitive lacks the flexibility of high-level Entity APIs.