Skip to content
Development
Skill

/cesiumjs-camera

CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, composable Controller camera controllers (1.144), CameraEventAggregator, flight animation. Use when positioning the camera, creating flyTo animations, constraining user navigation, adding

From plugin
cesiumjs-skills
17815 skills1 hook1 MCP
Install
$ npx -y skills add CesiumGS/cesiumjs-skills --skill cesiumjs-camera --agent claude-code

How 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.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cesiumjs-camera

Context preview

The summary Claude sees to decide when to auto-load this skill.

CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, composable Controller camera controllers (1.144), CameraEventAggregator, flight animation. Use when positioning the camera, creating flyTo animations, constraining user navigation, adding

SKILL.md

cesiumjs-camera.SKILL.md
name: cesiumjs-camera
description: "CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, composable Controller camera controllers (1.144), CameraEventAggregator, flight animation. Use when positioning the camera, creating flyTo animations, constraining user navigation, adding custom or asset-inspection camera controllers, tracking entities, or converting between screen and world coordinates."

CesiumJS Camera & Navigation

> **Baseline:** CesiumJS v1.144 -- ES module imports (`import { ... } from "cesium";`)

Camera Fundamentals

Access via `viewer.camera`. The camera has a `position` (Cartesian3 in world coords), orientation vectors (`direction`, `up`, `right`), and a frustum. All angles are **radians**.

Read-only computed properties: `positionWC`, `positionCartographic`, `directionWC`, `upWC`, `rightWC`, `heading` (0 = north, clockwise), `pitch` (negative = down), `roll`, `transform`, `viewMatrix`, `inverseViewMatrix`.

Events: `moveStart` / `moveEnd` fire when movement begins/ends. `changed` fires when the camera moves by more than `percentageChanged` (default 0.5).

> **City views are more realistic with 3D buildings.** For production skyline, > street-level, or urban panorama views, use a tileset that is actually available > in the target environment. `Cesium.createOsmBuildingsAsync()` and Google > Photorealistic 3D Tiles are ion-entitlement-backed; avoid them in public or > no-token examples unless the caller explicitly asks for those services. For > portable examples, use an OpenStreetMap/ArcGIS basemap, visible markers, public > URL-backed 3D Tiles, or a higher-altitude city overview.

Altitude & Orientation Guidelines

Choose altitude and pitch to match the **scale of the feature** you want to show:

| View type | Altitude (m) | Pitch (deg) | Notes | |---|---|---|---| | **Tourist / monument standoff** | 50 -- 500 | -5 to -20 | Camera at near-ground level, offset laterally from the landmark. Subject fills the frame with sky visible above. Use `lookAt` with HeadingPitchRange pitch near -10°. **Never place the camera directly overhead at this range.** | | **Landmark close-up** | 500 -- 1,500 | -25 to -35 | Individual buildings/structures fill the frame. Use `lookAt` with appropriate range. | | **City panoramic / skyline** | 800 -- 1,500 | -10 to -20 | For viewing a skyline from across a river or bay. Position camera to the side, face the city. Use an available 3D Tiles source only when the environment provides one. | | **City overview** | 2,000 -- 5,000 | -35 to -50 | Urban grid, rivers, and parks clearly visible | | **Metro / regional** | 8,000 -- 20,000 | -60 to -90 | Entire metro area or geographic feature | | **Canyon / cliff rim** | 50 -- 300 above rim | -15 to -25 | Use steeper pitch to reveal depth below. Near-horizontal (-5) looks flat across terrain. Add wall/rim entity overlays and a river polyline to make canyon structure visible. | | **Country / continent** | 500,000 -- 5,000,000 | -90 | Political boundaries, coastlines |

**When the prompt says "looking at [city]" or "start at [city]"**, default to **city overview** range (2,000-5,000 m) with pitch around **-45** to **-60** degrees and heading **0** (north). This produces a clear, recognizable view where the urban layout, rivers, and landmarks are identifiable.

> **Target intent vs. camera position:** In `setView` and `flyTo`, a Cartesian > `destination` is the camera's final position, not the point it should look at. > For requests such as "fly to Los Angeles" or "show the Eiffel Tower", treat > the named coordinates as a target to frame. Prefer `viewBoundingSphere` for > an instant view or `flyToBoundingSphere` for an animated flight.

**Top-down views** (`pitch: -90`) are best for geographic features (canyons, coastlines, rivers) where overhead perspective reveals the distinctive shape. For cities, prefer an angled view that shows the 3D skyline.

> **Gimbal lock:** Never use `pitch: -Math.PI/2` exactly. Use > `-(Math.PI / 2 - 0.0001)` for straight-down views to avoid singularity.

> **Ground-level views (altitude < 200 m)** require 3D Tiles. Without them, > CesiumJS shows only sky and flat ground. Suggest a higher-altitude fallback.

> **Skyline panoramics** (across a river/bay): 800-1,500 m, pitch -10 to -20. > Add an available 3D Tiles source for a true 3D silhouette; otherwise make the > screenshot goal honest by using a higher-altitude map/marker view. Pitch too > horizontal (-5) at moderate altitude shows a flat grid, not a skyline.

> **Public visual eval rule for landmarks:** OpenStreetMap imagery alone does > not render the Eiffel Tower, Empire State Building, Statue of Liberty, or a > skyline as recognizable 3D subjects. When a public/no-token scenario asks for > an identifiable landmark or skyline, add an explicit visual surrogate at the > target: a tall cylinder/box/polyline tower, colored mast, skyline bar cluster, > or large labeled marker. Frame that surrogate so it is inspectable, roughly > one-third to two-thirds of the frame height for landmark views. Do not rely on > a map label or 10 px point as the subject.

> **Canyon / cliff rim views**: pitch -15 to -25. Near-horizontal pitch (-5 to > -8) looks flat across terrain and misses the vertical drop. Always add entity > overlays (rim wall polygons, river polyline) so the canyon structure is > visible -- without entities the scene shows only a flat basemap regardless > of camera angle.

> **CRITICAL -- Never place the camera directly above a landmark** when a > standoff / perspective view is intended. Positioning the camera at > `Cartesian3.fromDegrees(lon, lat, 1000)` pointing straight down > (`pitch: -Math.PI/2`) puts the camera overhead the subject (`up_alignment=1`) > and fails landmark-view checks. Always offset the camera laterally: > use `lookAt` with a HeadingPitchRange pitch of -10° to -45°, or place the > `destination` 500--2,000 m to the side of the landmark and aim the heading > toward i

Read more
Ships withcesiumjs-skills

Curated agent skills for CesiumJS development — 14 domain skills covering ~551 public symbols across the CesiumJS v1.143 API surface.

Get the whole plugin
Stats
178
Stars
21
Forks
Active
Maintenance
JavaScript
Language
Apache-2.0
License
5d ago
Last commit
5mo ago
Created

Repo: CesiumGS/cesiumjs-skills

Other skills on cesiumjs-skills.