cesiumgs/cesiumjs-skills/cesiumjs-models-particles
Claude Code and agent skill by cesiumgs/cesiumjs-skills
- community
Checking that the SKILL.md file is still in the repository.
CesiumJS models, glTF, and particle effects - Model, KHR_meshopt_compression, CAD glTF extensions, EdgeDisplayMode, ModelAnimation, ModelNode, ParticleSystem, emitters, GPM extensions. Use when loading compressed or CAD-style glTF/GLB models, controlling edge rendering, playing model animations, positioning particles, or working with geospatial positioning metadata.
Install
npx vskill@latest install cesiumgs/cesiumjs-skills/cesiumjs-models-particlesSKILL.md
CesiumJS Models, glTF & Particle Effects
Version baseline: CesiumJS v1.144.
Quick Reference
| Class | Purpose | |
|---|---|---|
Model | Low-level glTF/GLB primitive; positioned via modelMatrix | |
ModelAnimation | Active animation instance on a model | |
ModelAnimationCollection | Collection at model.activeAnimations | |
ModelNode | Named node with modifiable transform | |
ModelFeature | Per-feature styling/picking for feature-ID models | |
EdgeDisplayMode | Controls draft glTF edge-visibility rendering on Model/Cesium3DTileset | |
ParticleSystem | Billboard-based particle manager (fire, smoke, rain) | |
Particle | Single particle with position, velocity, life | |
ParticleBurst | Scheduled burst of particles | |
BoxEmitter / CircleEmitter | Emit within box volume / flat disk | |
ConeEmitter / SphereEmitter | Emit from cone tip / within sphere |
The Entity API exposes models through ModelGraphics (see cesiumjs-entities). The Primitive API uses Model.fromGltfAsync for full control over modelMatrix, animations, and node transforms.
Loading a glTF/GLB Model
Always use the async factory -- never call the constructor directly.
Public Sample Models
CesiumJS ships sample models usable without ion tokens:
CesiumJS 1.143 decodes KHR_meshopt_compression automatically, including the v1 attribute codec and COLOR filter. Do not import a decoder or private loader helper. When loading compressed glTF, CAD-style lines/points/edges, or constant-LOD textures, read REFERENCE.md for the complete support and authoring matrix. The same loader behavior applies to glTF content inside 3D Tiles.
Positioned Model with Heading
Visual eval framing: for model screenshots, the model must be fully insidethe frame and recognizable, not clipped at the bottom edge. UseminimumPixelSize256-400 for public sample aircraft, add a subtlesilhouetteColor/silhouetteSize, and place the camera with explicitcoordinates aimed at the known model position. Avoid shallow pitches that putthe model below the frame or rely onviewer.flyTo(model), which isversion-sensitive forModelprimitives.
Avoiding Distorted Model Appearance
Models can appear stretched or warped when scale is applied non-uniformly or when the orientation matrix is built incorrectly. Common pitfalls:
- Always use `Transforms.headingPitchRollToFixedFrame` (or the Entity API's `headingPitchRollQuaternion`) for ground-aligned orientation. Hand-rolled quaternions often invert pitch/roll axes and produce vertically stretched silhouettes.
- Use `scale` (uniform) for size, not a non-uniform `Matrix4.fromScale`. A non-uniform scale baked into
modelMatrixwill distort the model. ReserveMatrix4.fromScalefor per-node tweaks (e.g., stretching a single turret), not the whole model. - Pair `minimumPixelSize` with a sensible `maximumScale`. Without a cap, distant small models can balloon to fill the frame and look elongated when the camera is close.
Key Model.fromGltfAsync Options
| Option | Type | Default | ||
|---|---|---|---|---|
url | `string\ | Resource` | required | |
modelMatrix | Matrix4 | IDENTITY | ||
scale | number | 1.0 | ||
minimumPixelSize | number | 0.0 | ||
maximumScale | number | -- | ||
show | boolean | true | ||
color / colorBlendMode / colorBlendAmount | Color / ColorBlendMode / number | -- / HIGHLIGHT / 0.5 | ||
edgeDisplayMode | EdgeDisplayMode | SURFACES_ONLY | ||
silhouetteColor / silhouetteSize | Color / number | RED / 0.0 | ||
shadows | ShadowMode | ENABLED | ||
heightReference | HeightReference | NONE | ||
customShader | CustomShader | -- | ||
id | any | -- | ||
allowPicking | boolean | true |
Readiness and Lifecycle
fromGltfAsync resolves once glTF JSON is parsed, but WebGL resources may still load. Wait for readyEvent before accessing animations, nodes, or boundingSphere.
Animations
Managed through model.activeAnimations (ModelAnimationCollection).
Play by Name / Play All
Additional add options: index, reverse, startTime, stopTime, delay, removeOnStop, animationTime (custom time callback).
Animations require `viewer.clock.shouldAnimate = true` to advance. A walking character will appear frozen mid-pose (or distorted if at the seam between keyframes) if the clock is stopped.
Animation Events
Model Nodes
Override named node transforms for procedural animation (e.g., turret rotation).
Properties: name (read-only), id (read-only index), show (boolean), matrix (Matrix4 -- set to undefined to restore original and re-enable glTF animations).
Coloring, Silhouettes, and Feature Picking
Edge Display Mode (Experimental, 1.142+)
For glTF assets using the draft EXT_mesh_primitive_edge_visibility extension, EdgeDisplayMode controls whether extension-provided edges are hidden, composited over surfaces, or rendered alone. Models without the extension are unaffected.
When a glTF has EXT_mesh_features or EXT_structural_metadata, picking returns a ModelFeature:
Height Reference
Values: NONE, CLAMP_TO_GROUND, RELATIVE_TO_GROUND, CLAMP_TO_TERRAIN, RELATIVE_TO_TERRAIN, CLAMP_TO_3D_TILE, RELATIVE_TO_3D_TILE.
Particle Systems
ParticleSystem renders billboard-based effects. Position with modelMatrix (world) and emitterModelMatrix (local offset).
Always set `viewer.clock.shouldAnimate = true` before adding a particle system -- particles only move when the clock is running. A stopped clock produces a static "blob" at the emitter origin rather than a directional plume.
Producing a Legible Vertical Plume
A common failure mode is rendering a diffuse spherical blob instead of a recognizable rising column. To make plumes read as vertical:
- Use `CircleEmitter` or a narrow `ConeEmitter` for upward-biased velocity.
SphereEmitterandBoxEmitterradiate in all directions and produce blob-like shapes. - Bias velocity strongly upward -- emitters' local +Z is up in the
modelMatrixframe; setmodelMatrixviaTransforms.eastNorthUpToFixedFrameso +Z is local up. - Use a multi-second `minimumParticleLife` / `maximumParticleLife` (e.g., 1.5-4.0) so particles travel far enough to form a visible column before fading.
- Scale particles over their lifetime (
startScalesmall,endScale3-6x larger) so the plume widens with height, matching real smoke. - Keep the emitter footprint smaller than the visible plume. For crater smoke, use a small disk or point source; oversized ground ellipses read as the subject instead of a source marker.
- Avoid solving clipping by making the plume huge. If the top is clipped, first increase camera range or lower particle life/speed/endScale; do not let the plume fill all four edges of the frame.
- Wait for several seconds of simulation time before screenshotting -- the plume needs to develop. Advance the clock or use
viewer.clock.shouldAnimate = trueand wait.
Smoke Trail
Volcanic / Crater Smoke Calibration
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cesiumjs-models-particles/SKILL.md
Popularity
- Repository stars
- 84
- Repository forks
- 12
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Jun 2026, 4 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cesiumgs/cesiumjs-skills/cesiumjs-models-particles)