/cesiumjs-time-properties
CesiumJS time, properties, and animation - Clock, JulianDate, TimeInterval, Property, SampledProperty, CallbackProperty, PathMode, interval and sampled path materials, interpolation, splines, CZML temporal data. Use when making entity attributes or path materials time-dynamic,
$ npx -y skills add CesiumGS/cesiumjs-skills --skill cesiumjs-time-properties --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-time-properties
Context preview
The summary Claude sees to decide when to auto-load this skill.
CesiumJS time, properties, and animation - Clock, JulianDate, TimeInterval, Property, SampledProperty, CallbackProperty, PathMode, interval and sampled path materials, interpolation, splines, CZML temporal data. Use when making entity attributes or path materials time-dynamic,
SKILL.md
cesiumjs-time-properties.SKILL.mdname: cesiumjs-time-properties
description: "CesiumJS time, properties, and animation - Clock, JulianDate, TimeInterval, Property, SampledProperty, CallbackProperty, PathMode, interval and sampled path materials, interpolation, splines, CZML temporal data. Use when making entity attributes or path materials time-dynamic, configuring the simulation clock, interpolating positions, or working with sampled, interval, or callback properties."
CesiumJS Time, Properties & Animation
Version baseline: CesiumJS v1.143
Covers the temporal data-binding layer: Clock/JulianDate time system, the Property hierarchy that makes entity attributes change over time, interpolation algorithms, splines, and material properties. Properties live here (not with Entities) because SampledProperty and CallbackProperty are meaningless without Clock/JulianDate. The Material class (Fabric) belongs in cesiumjs-materials-shaders.
JulianDate -- The Time Primitive
Stores whole days + fractional seconds separately for precision. Always uses TAI internally.
import { JulianDate } from "cesium";
// Creation: fromIso8601 (most common), fromDate, now
const date = JulianDate.fromIso8601("2025-06-15T12:00:00Z");
const jd = JulianDate.fromDate(new Date("2025-06-15T12:00:00Z"));
const now = JulianDate.now();
// Conversion: toIso8601, toDate, toGregorianDate
const iso = JulianDate.toIso8601(date); // "2025-06-15T12:00:00Z"
const greg = JulianDate.toGregorianDate(date); // {year, month, day, hour, ...}
// Arithmetic -- all require a result parameter to avoid allocations
const r = new JulianDate();
JulianDate.addSeconds(date, 3600, r); // also: addMinutes, addHours, addDays
// Differences and comparisons
const stop = JulianDate.addHours(date, 24, new JulianDate());
JulianDate.secondsDifference(stop, date); // 86400
JulianDate.lessThan(date, stop); // true
JulianDate.compare(date, stop); // negative (date < stop)Clock -- Simulation Time Controller
The Viewer creates a Clock automatically. Configure it to control playback speed and bounds.
import { Viewer, JulianDate, ClockRange, ClockStep } from "cesium";
const viewer = new Viewer("cesiumContainer");
const start = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
const stop = JulianDate.addHours(start, 24, new JulianDate());
viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = ClockRange.LOOP_STOP; // loop at end
viewer.clock.multiplier = 60; // 60x real-time
viewer.clock.shouldAnimate = true;
viewer.timeline.zoomTo(start, stop);
viewer.clock.onTick.addEventListener((clock) => { // per-frame callback
console.log(JulianDate.toIso8601(clock.currentTime));
});| ClockRange | Behavior | |---|---| | `UNBOUNDED` | Advances forever in both directions | | `CLAMPED` | Stops at start/stop time | | `LOOP_STOP` | Wraps from stop back to start |
| ClockStep | Behavior | |---|---| | `TICK_DEPENDENT` | Each tick advances by `multiplier` seconds (frame-dependent) | | `SYSTEM_CLOCK_MULTIPLIER` | Elapsed wall time x `multiplier` (default) | | `SYSTEM_CLOCK` | Real-time; ignores multiplier |
TimeInterval & TimeIntervalCollection
import { TimeInterval, TimeIntervalCollection, JulianDate } from "cesium";
const interval = TimeInterval.fromIso8601({
iso8601: "2025-06-15T00:00:00Z/2025-06-16T00:00:00Z",
data: { phase: "daylight" }, // attach arbitrary data
});
TimeInterval.contains(interval, JulianDate.fromIso8601("2025-06-15T12:00:00Z")); // true
// Used by Entity.availability to cull entities outside the time window
const availability = new TimeIntervalCollection([
new TimeInterval({
start: JulianDate.fromIso8601("2025-06-15T00:00:00Z"),
stop: JulianDate.fromIso8601("2025-06-16T00:00:00Z"),
}),
]);Property System -- Time-Varying Values
Every entity attribute is a Property. CesiumJS calls `property.getValue(time)` each frame.
ConstantProperty
Returns the same value regardless of time. CesiumJS auto-wraps raw values, so explicit use is rare.
import { ConstantProperty, Color } from "cesium";
const prop = new ConstantProperty(Color.RED);
prop.setValue(Color.BLUE); // fires definitionChangedSampledProperty -- Interpolated Time Series
Stores discrete samples and interpolates. Type can be `Number`, `Cartesian3`, `Color`, or any `Packable`.
import { SampledProperty, JulianDate, LagrangePolynomialApproximation, ExtrapolationType } from "cesium";
const prop = new SampledProperty(Number);
const t0 = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
prop.addSample(t0, 1.0);
prop.addSample(JulianDate.addSeconds(t0, 60, new JulianDate()), 2.5);
prop.addSample(JulianDate.addSeconds(t0, 120, new JulianDate()), 1.0);
prop.getValue(JulianDate.addSeconds(t0, 30, new JulianDate())); // ~1.75
// Default: LinearApproximation degree 1. Switch to smoother Lagrange:
prop.setInterpolationOptions({ interpolationDegree: 5, interpolationAlgorithm: LagrangePolynomialApproximation });
prop.forwardExtrapolationType = ExtrapolationType.HOLD; // hold last value outside rangeSampledPositionProperty -- Interpolated Positions
Specialized for Cartesian3 positions. Supports reference frames (`ReferenceFrame.FIXED` default, or `INERTIAL`).
import { SampledPositionProperty, JulianDate, Cartesian3, LagrangePolynomialApproximation, ExtrapolationType } from "cesium";
const position = new SampledPositionProperty();
const start = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
for (let i = 0; i <= 360; i += 45) {
const rad = (i * Math.PI) / 180;
position.addSample(
JulianDate.addSeconds(start, i, new JulianDate()),
Cartesian3.fromDegrees(-112 + 0.045 * Math.cos(rad), 36 + 0.03 * Math.sin(rad), 2000 + Math.random() * 500),
);
}
position.setInterpolationOptions({ interpolationDegree: 5, interpolationAlgorithm: LagrangePolynomialApproximation });
position.forwardExtrapolationRead more
name: cesiumjs-time-properties description: "CesiumJS time, properties, and animation - Clock, JulianDate, TimeInterval, Property, SampledProperty, CallbackProperty, PathMode, interval and sampled path materials, interpolation, splines, CZML temporal data. Use when making entity attributes or path materials time-dynamic, configuring the simulation clock, interpolating positions, or working with sampled, interval, or callback properties."
CesiumJS Time, Properties & Animation
Version baseline: CesiumJS v1.143
Covers the temporal data-binding layer: Clock/JulianDate time system, the Property hierarchy that makes entity attributes change over time, interpolation algorithms, splines, and material properties. Properties live here (not with Entities) because SampledProperty and CallbackProperty are meaningless without Clock/JulianDate. The Material class (Fabric) belongs in cesiumjs-materials-shaders.
JulianDate -- The Time Primitive
Stores whole days + fractional seconds separately for precision. Always uses TAI internally.
import { JulianDate } from "cesium";
// Creation: fromIso8601 (most common), fromDate, now
const date = JulianDate.fromIso8601("2025-06-15T12:00:00Z");
const jd = JulianDate.fromDate(new Date("2025-06-15T12:00:00Z"));
const now = JulianDate.now();
// Conversion: toIso8601, toDate, toGregorianDate
const iso = JulianDate.toIso8601(date); // "2025-06-15T12:00:00Z"
const greg = JulianDate.toGregorianDate(date); // {year, month, day, hour, ...}
// Arithmetic -- all require a result parameter to avoid allocations
const r = new JulianDate();
JulianDate.addSeconds(date, 3600, r); // also: addMinutes, addHours, addDays
// Differences and comparisons
const stop = JulianDate.addHours(date, 24, new JulianDate());
JulianDate.secondsDifference(stop, date); // 86400
JulianDate.lessThan(date, stop); // true
JulianDate.compare(date, stop); // negative (date < stop)Clock -- Simulation Time Controller
The Viewer creates a Clock automatically. Configure it to control playback speed and bounds.
import { Viewer, JulianDate, ClockRange, ClockStep } from "cesium";
const viewer = new Viewer("cesiumContainer");
const start = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
const stop = JulianDate.addHours(start, 24, new JulianDate());
viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = ClockRange.LOOP_STOP; // loop at end
viewer.clock.multiplier = 60; // 60x real-time
viewer.clock.shouldAnimate = true;
viewer.timeline.zoomTo(start, stop);
viewer.clock.onTick.addEventListener((clock) => { // per-frame callback
console.log(JulianDate.toIso8601(clock.currentTime));
});| ClockRange | Behavior | |---|---| | `UNBOUNDED` | Advances forever in both directions | | `CLAMPED` | Stops at start/stop time | | `LOOP_STOP` | Wraps from stop back to start |
| ClockStep | Behavior | |---|---| | `TICK_DEPENDENT` | Each tick advances by `multiplier` seconds (frame-dependent) | | `SYSTEM_CLOCK_MULTIPLIER` | Elapsed wall time x `multiplier` (default) | | `SYSTEM_CLOCK` | Real-time; ignores multiplier |
TimeInterval & TimeIntervalCollection
import { TimeInterval, TimeIntervalCollection, JulianDate } from "cesium";
const interval = TimeInterval.fromIso8601({
iso8601: "2025-06-15T00:00:00Z/2025-06-16T00:00:00Z",
data: { phase: "daylight" }, // attach arbitrary data
});
TimeInterval.contains(interval, JulianDate.fromIso8601("2025-06-15T12:00:00Z")); // true
// Used by Entity.availability to cull entities outside the time window
const availability = new TimeIntervalCollection([
new TimeInterval({
start: JulianDate.fromIso8601("2025-06-15T00:00:00Z"),
stop: JulianDate.fromIso8601("2025-06-16T00:00:00Z"),
}),
]);Property System -- Time-Varying Values
Every entity attribute is a Property. CesiumJS calls `property.getValue(time)` each frame.
ConstantProperty
Returns the same value regardless of time. CesiumJS auto-wraps raw values, so explicit use is rare.
import { ConstantProperty, Color } from "cesium";
const prop = new ConstantProperty(Color.RED);
prop.setValue(Color.BLUE); // fires definitionChangedSampledProperty -- Interpolated Time Series
Stores discrete samples and interpolates. Type can be `Number`, `Cartesian3`, `Color`, or any `Packable`.
import { SampledProperty, JulianDate, LagrangePolynomialApproximation, ExtrapolationType } from "cesium";
const prop = new SampledProperty(Number);
const t0 = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
prop.addSample(t0, 1.0);
prop.addSample(JulianDate.addSeconds(t0, 60, new JulianDate()), 2.5);
prop.addSample(JulianDate.addSeconds(t0, 120, new JulianDate()), 1.0);
prop.getValue(JulianDate.addSeconds(t0, 30, new JulianDate())); // ~1.75
// Default: LinearApproximation degree 1. Switch to smoother Lagrange:
prop.setInterpolationOptions({ interpolationDegree: 5, interpolationAlgorithm: LagrangePolynomialApproximation });
prop.forwardExtrapolationType = ExtrapolationType.HOLD; // hold last value outside rangeSampledPositionProperty -- Interpolated Positions
Specialized for Cartesian3 positions. Supports reference frames (`ReferenceFrame.FIXED` default, or `INERTIAL`).
import { SampledPositionProperty, JulianDate, Cartesian3, LagrangePolynomialApproximation, ExtrapolationType } from "cesium";
const position = new SampledPositionProperty();
const start = JulianDate.fromIso8601("2025-06-15T00:00:00Z");
for (let i = 0; i <= 360; i += 45) {
const rad = (i * Math.PI) / 180;
position.addSample(
JulianDate.addSeconds(start, i, new JulianDate()),
Cartesian3.fromDegrees(-112 + 0.045 * Math.cos(rad), 36 + 0.03 * Math.sin(rad), 2000 + Math.random() * 500),
);
}
position.setInterpolationOptions({ interpolationDegree: 5, interpolationAlgorithm: LagrangePolynomialApproximation });
position.forwardExtrapolationShowing 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-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
Open skill - /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

