High-level entity management system for creating and visualizing geospatial data with graphics objects and properties.
import { Entity, EntityCollection, DataSource, PointGraphics, BillboardGraphics, PolygonGraphics } from "cesium";Core entity system for high-level data visualization.
/**
* A scene entity representing a visualization object
*/
class Entity {
constructor(options?: EntityOptions);
id: string;
name?: string;
availability?: TimeIntervalCollection;
show: boolean;
description?: Property;
position?: PositionProperty;
orientation?: Property;
viewFrom?: Property;
parent?: Entity;
billboard?: BillboardGraphics;
box?: BoxGraphics;
corridor?: CorridorGraphics;
cylinder?: CylinderGraphics;
ellipse?: EllipseGraphics;
ellipsoid?: EllipsoidGraphics;
label?: LabelGraphics;
model?: ModelGraphics;
path?: PathGraphics;
plane?: PlaneGraphics;
point?: PointGraphics;
polygon?: PolygonGraphics;
polyline?: PolylineGraphics;
polylineVolume?: PolylineVolumeGraphics;
rectangle?: RectangleGraphics;
wall?: WallGraphics;
isShowing(time: JulianDate): boolean;
isAvailable(time: JulianDate): boolean;
addProperty(propertyName: string): void;
removeProperty(propertyName: string): void;
merge(source: Entity): void;
}
interface EntityOptions {
id?: string;
name?: string;
availability?: TimeIntervalCollection;
show?: boolean;
description?: Property;
position?: PositionProperty;
orientation?: Property;
viewFrom?: Property;
parent?: Entity;
billboard?: BillboardGraphics;
box?: BoxGraphics;
corridor?: CorridorGraphics;
cylinder?: CylinderGraphics;
ellipse?: EllipseGraphics;
ellipsoid?: EllipsoidGraphics;
label?: LabelGraphics;
model?: ModelGraphics;
path?: PathGraphics;
plane?: PlaneGraphics;
point?: PointGraphics;
polygon?: PolygonGraphics;
polyline?: PolylineGraphics;
polylineVolume?: PolylineVolumeGraphics;
rectangle?: RectangleGraphics;
wall?: WallGraphics;
}
/**
* Collection of entities for managing scene objects
*/
class EntityCollection {
readonly collectionChanged: Event;
readonly id: string;
readonly values: Entity[];
readonly owner?: DataSource | CompositeEntityCollection;
show: boolean;
add(entity: Entity): Entity;
remove(entity: Entity): boolean;
contains(entity: Entity): boolean;
removeById(id: string): boolean;
removeAll(): void;
getById(id: string): Entity;
getOrCreateEntity(id: string): Entity;
suspendEvents(): void;
resumeEvents(): void;
computeAvailability(): TimeInterval;
}
/**
* Composite collection combining multiple entity collections
*/
class CompositeEntityCollection {
readonly collectionChanged: Event;
readonly id: string;
readonly values: Entity[];
show: boolean;
addCollection(collection: EntityCollection, index?: number): void;
removeCollection(collection: EntityCollection): boolean;
removeAllCollections(): void;
containsCollection(collection: EntityCollection): boolean;
indexOfCollection(collection: EntityCollection): number;
getCollection(index: number): EntityCollection;
getCollectionsLength(): number;
raiseCollection(collection: EntityCollection): void;
lowerCollection(collection: EntityCollection): void;
raiseCollectionToTop(collection: EntityCollection): void;
lowerCollectionToBottom(collection: EntityCollection): void;
suspendEvents(): void;
resumeEvents(): void;
computeAvailability(): TimeInterval;
getById(id: string): Entity;
}Visual graphics attached to entities for rendering different shapes.
/**
* Billboard graphics for 2D images in 3D space
*/
class BillboardGraphics {
constructor(options?: BillboardGraphicsOptions);
show?: Property;
image?: Property;
scale?: Property;
pixelOffset?: Property;
eyeOffset?: Property;
horizontalOrigin?: Property;
verticalOrigin?: Property;
color?: Property;
rotation?: Property;
alignedAxis?: Property;
sizeInMeters?: Property;
width?: Property;
height?: Property;
scaleByDistance?: Property;
translucencyByDistance?: Property;
pixelOffsetScaleByDistance?: Property;
imageSubRegion?: Property;
distanceDisplayCondition?: Property;
disableDepthTestDistance?: Property;
clone(result?: BillboardGraphics): BillboardGraphics;
merge(source: BillboardGraphics): void;
}
/**
* Point graphics for rendered points
*/
class PointGraphics {
constructor(options?: PointGraphicsOptions);
show?: Property;
pixelSize?: Property;
heightReference?: Property;
color?: Property;
outlineColor?: Property;
outlineWidth?: Property;
scaleByDistance?: Property;
translucencyByDistance?: Property;
distanceDisplayCondition?: Property;
disableDepthTestDistance?: Property;
clone(result?: PointGraphics): PointGraphics;
merge(source: PointGraphics): void;
}
/**
* Label graphics for text rendering
*/
class LabelGraphics {
constructor(options?: LabelGraphicsOptions);
show?: Property;
text?: Property;
font?: Property;
style?: Property;
scale?: Property;
showBackground?: Property;
backgroundColor?: Property;
backgroundPadding?: Property;
pixelOffset?: Property;
eyeOffset?: Property;
horizontalOrigin?: Property;
verticalOrigin?: Property;
heightReference?: Property;
fillColor?: Property;
outlineColor?: Property;
outlineWidth?: Property;
translucencyByDistance?: Property;
pixelOffsetScaleByDistance?: Property;
scaleByDistance?: Property;
distanceDisplayCondition?: Property;
disableDepthTestDistance?: Property;
clone(result?: LabelGraphics): LabelGraphics;
merge(source: LabelGraphics): void;
}
/**
* Box graphics for rectangular prisms
*/
class BoxGraphics {
constructor(options?: BoxGraphicsOptions);
show?: Property;
dimensions?: Property;
heightReference?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: BoxGraphics): BoxGraphics;
merge(source: BoxGraphics): void;
}
/**
* Polyline graphics for connected line segments
*/
class PolylineGraphics {
constructor(options?: PolylineGraphicsOptions);
show?: Property;
positions?: Property;
width?: Property;
granularity?: Property;
material?: MaterialProperty;
depthFailMaterial?: MaterialProperty;
arcType?: Property;
clampToGround?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
classificationType?: Property;
zIndex?: Property;
clone(result?: PolylineGraphics): PolylineGraphics;
merge(source: PolylineGraphics): void;
}
/**
* Polygon graphics for filled areas
*/
class PolygonGraphics {
constructor(options?: PolygonGraphicsOptions);
show?: Property;
hierarchy?: Property;
height?: Property;
heightReference?: Property;
extrudedHeight?: Property;
extrudedHeightReference?: Property;
stRotation?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
perPositionHeight?: Property;
closeTop?: Property;
closeBottom?: Property;
arcType?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
classificationType?: Property;
zIndex?: Property;
clone(result?: PolygonGraphics): PolygonGraphics;
merge(source: PolygonGraphics): void;
}
/**
* Model graphics for 3D models
*/
class ModelGraphics {
constructor(options?: ModelGraphicsOptions);
show?: Property;
uri?: Property;
scale?: Property;
minimumPixelSize?: Property;
maximumScale?: Property;
incrementallyLoadTextures?: Property;
runAnimations?: Property;
clampAnimations?: Property;
shadows?: Property;
heightReference?: Property;
silhouetteColor?: Property;
silhouetteSize?: Property;
color?: Property;
colorBlendMode?: Property;
colorBlendAmount?: Property;
distanceDisplayCondition?: Property;
nodeTransformations?: Property;
articulations?: Property;
clone(result?: ModelGraphics): ModelGraphics;
merge(source: ModelGraphics): void;
}
/**
* Corridor graphics for creating path-like volumes
*/
class CorridorGraphics {
constructor(options?: CorridorGraphicsOptions);
show?: Property;
positions?: Property;
width?: Property;
height?: Property;
heightReference?: Property;
extrudedHeight?: Property;
extrudedHeightReference?: Property;
cornerType?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
classificationType?: Property;
zIndex?: Property;
clone(result?: CorridorGraphics): CorridorGraphics;
merge(source: CorridorGraphics): void;
}
/**
* Cylinder graphics for cylindrical shapes
*/
class CylinderGraphics {
constructor(options?: CylinderGraphicsOptions);
show?: Property;
length?: Property;
topRadius?: Property;
bottomRadius?: Property;
heightReference?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
numberOfVerticalLines?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: CylinderGraphics): CylinderGraphics;
merge(source: CylinderGraphics): void;
}
/**
* Ellipse graphics for elliptical shapes
*/
class EllipseGraphics {
constructor(options?: EllipseGraphicsOptions);
show?: Property;
semiMajorAxis?: Property;
semiMinorAxis?: Property;
height?: Property;
heightReference?: Property;
extrudedHeight?: Property;
extrudedHeightReference?: Property;
rotation?: Property;
stRotation?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
numberOfVerticalLines?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
classificationType?: Property;
zIndex?: Property;
clone(result?: EllipseGraphics): EllipseGraphics;
merge(source: EllipseGraphics): void;
}
/**
* Ellipsoid graphics for 3D ellipsoidal shapes
*/
class EllipsoidGraphics {
constructor(options?: EllipsoidGraphicsOptions);
show?: Property;
radii?: Property;
innerRadii?: Property;
minimumClock?: Property;
maximumClock?: Property;
minimumCone?: Property;
maximumCone?: Property;
heightReference?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
stackPartitions?: Property;
slicePartitions?: Property;
subdivisions?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: EllipsoidGraphics): EllipsoidGraphics;
merge(source: EllipsoidGraphics): void;
}
/**
* Rectangle graphics for rectangular areas
*/
class RectangleGraphics {
constructor(options?: RectangleGraphicsOptions);
show?: Property;
coordinates?: Property;
height?: Property;
heightReference?: Property;
extrudedHeight?: Property;
extrudedHeightReference?: Property;
rotation?: Property;
stRotation?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
classificationType?: Property;
zIndex?: Property;
clone(result?: RectangleGraphics): RectangleGraphics;
merge(source: RectangleGraphics): void;
}
/**
* Wall graphics for vertical surfaces between points
*/
class WallGraphics {
constructor(options?: WallGraphicsOptions);
show?: Property;
positions?: Property;
minimumHeights?: Property;
maximumHeights?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: WallGraphics): WallGraphics;
merge(source: WallGraphics): void;
}
/**
* Path graphics for showing object trajectories
*/
class PathGraphics {
constructor(options?: PathGraphicsOptions);
show?: Property;
leadTime?: Property;
trailTime?: Property;
width?: Property;
resolution?: Property;
material?: MaterialProperty;
distanceDisplayCondition?: Property;
clone(result?: PathGraphics): PathGraphics;
merge(source: PathGraphics): void;
}
/**
* Plane graphics for planar surfaces
*/
class PlaneGraphics {
constructor(options?: PlaneGraphicsOptions);
show?: Property;
plane?: Property;
dimensions?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: PlaneGraphics): PlaneGraphics;
merge(source: PlaneGraphics): void;
}
/**
* Polyline volume graphics for tubes along polylines
*/
class PolylineVolumeGraphics {
constructor(options?: PolylineVolumeGraphicsOptions);
show?: Property;
positions?: Property;
shape?: Property;
cornerType?: Property;
granularity?: Property;
fill?: Property;
material?: MaterialProperty;
outline?: Property;
outlineColor?: Property;
outlineWidth?: Property;
shadows?: Property;
distanceDisplayCondition?: Property;
clone(result?: PolylineVolumeGraphics): PolylineVolumeGraphics;
merge(source: PolylineVolumeGraphics): void;
}Dynamic properties for animating entity attributes over time.
/**
* Base interface for all properties
*/
interface Property {
isConstant: boolean;
definitionChanged: Event;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
/**
* Property with a constant value
*/
class ConstantProperty {
constructor(value?: any);
getValue(time: JulianDate, result?: any): any;
setValue(value: any): void;
equals(other?: Property): boolean;
}
/**
* Property with a constant position value
*/
class ConstantPositionProperty {
constructor(value?: Cartesian3, referenceFrame?: ReferenceFrame);
getValue(time: JulianDate, result?: any): any;
getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3;
setValue(value: Cartesian3, referenceFrame?: ReferenceFrame): void;
equals(other?: Property): boolean;
}
/**
* Property interpolating between sampled values
*/
class SampledProperty {
constructor(type: number, derivativeTypes?: number[]);
readonly type: number;
readonly derivativeTypes: number[];
interpolationDegree: number;
interpolationAlgorithm: InterpolationAlgorithm;
forwardExtrapolationType: ExtrapolationType;
forwardExtrapolationDuration: number;
backwardExtrapolationType: ExtrapolationType;
backwardExtrapolationDuration: number;
getValue(time: JulianDate, result?: any): any;
addSample(time: JulianDate, value: any, derivatives?: any[]): void;
addSamples(times: JulianDate[], values: any[], derivativeValues?: any[][]): void;
addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void;
removeSample(time: JulianDate): boolean;
removeProperty(time: JulianDate): void;
equals(other?: Property): boolean;
}
/**
* Property interpolating between sampled position values
*/
class SampledPositionProperty {
constructor(referenceFrame?: ReferenceFrame, numberOfDerivatives?: number);
readonly numberOfDerivatives: number;
interpolationDegree: number;
interpolationAlgorithm: InterpolationAlgorithm;
forwardExtrapolationType: ExtrapolationType;
forwardExtrapolationDuration: number;
backwardExtrapolationType: ExtrapolationType;
backwardExtrapolationDuration: number;
getValue(time: JulianDate, result?: any): any;
getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3;
addSample(time: JulianDate, position: Cartesian3, derivatives?: Cartesian3[]): void;
addSamples(times: JulianDate[], positions: Cartesian3[], derivatives?: Cartesian3[][]): void;
addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void;
setInterpolationOptions(options?: InterpolationOptions): void;
equals(other?: Property): boolean;
}
/**
* Property that returns different values based on time intervals
*/
class TimeIntervalCollectionProperty {
constructor(type?: number);
readonly intervals: TimeIntervalCollection;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
/**
* Property that combines multiple properties
*/
class CompositeProperty {
constructor(type?: number);
readonly intervals: TimeIntervalCollection;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
/**
* Property computed using a callback function
*/
class CallbackProperty {
constructor(callback: CallbackPropertyCallback, isConstant: boolean);
getValue(time: JulianDate, result?: any): any;
setCallback(callback: CallbackPropertyCallback, isConstant: boolean): void;
equals(other?: Property): boolean;
}
type CallbackPropertyCallback = (time: JulianDate, result?: any) => any;
/**
* Property that references another entity's property
*/
class ReferenceProperty {
constructor(targetCollection: EntityCollection, targetId: string, targetPropertyNames: string[]);
readonly targetCollection: EntityCollection;
readonly targetId: string;
readonly targetPropertyNames: string[];
readonly resolvedProperty?: Property;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}Materials for styling graphics objects.
/**
* Base interface for material properties
*/
interface MaterialProperty extends Property {
getType(time: JulianDate): string;
}
/**
* Material property with solid color
*/
class ColorMaterialProperty {
constructor(color?: Property | Color);
color: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
/**
* Material property using an image
*/
class ImageMaterialProperty {
constructor(options?: ImageMaterialPropertyOptions);
image: Property;
repeat?: Property;
color?: Property;
transparent?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface ImageMaterialPropertyOptions {
image?: Property | string;
repeat?: Property | Cartesian2;
color?: Property | Color;
transparent?: Property | boolean;
}
/**
* Material property with grid pattern
*/
class GridMaterialProperty {
constructor(options?: GridMaterialPropertyOptions);
color?: Property;
cellAlpha?: Property;
lineCount?: Property;
lineThickness?: Property;
lineOffset?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface GridMaterialPropertyOptions {
color?: Property | Color;
cellAlpha?: Property | number;
lineCount?: Property | Cartesian2;
lineThickness?: Property | Cartesian2;
lineOffset?: Property | Cartesian2;
}
/**
* Material property with stripe pattern
*/
class StripeMaterialProperty {
constructor(options?: StripeMaterialPropertyOptions);
evenColor?: Property;
oddColor?: Property;
offset?: Property;
repeat?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface StripeMaterialPropertyOptions {
evenColor?: Property | Color;
oddColor?: Property | Color;
offset?: Property | number;
repeat?: Property | number;
}
/**
* Material property with checkerboard pattern
*/
class CheckerboardMaterialProperty {
constructor(options?: CheckerboardMaterialPropertyOptions);
evenColor?: Property;
oddColor?: Property;
repeat?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface CheckerboardMaterialPropertyOptions {
evenColor?: Property | Color;
oddColor?: Property | Color;
repeat?: Property | Cartesian2;
}
/**
* Polyline material with glow effect
*/
class PolylineGlowMaterialProperty {
constructor(options?: PolylineGlowMaterialPropertyOptions);
color?: Property;
glowPower?: Property;
taperPower?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface PolylineGlowMaterialPropertyOptions {
color?: Property | Color;
glowPower?: Property | number;
taperPower?: Property | number;
}
/**
* Polyline material with outline
*/
class PolylineOutlineMaterialProperty {
constructor(options?: PolylineOutlineMaterialPropertyOptions);
color?: Property;
outlineColor?: Property;
outlineWidth?: Property;
getType(time: JulianDate): string;
getValue(time: JulianDate, result?: any): any;
equals(other?: Property): boolean;
}
interface PolylineOutlineMaterialPropertyOptions {
color?: Property | Color;
outlineColor?: Property | Color;
outlineWidth?: Property | number;
}Clustering system for managing large numbers of entities.
/**
* Entity clustering for performance with large entity counts
*/
class EntityCluster {
constructor(options?: EntityClusterOptions);
enabled: boolean;
pixelRange: number;
minimumClusterSize: number;
clusterBillboards: boolean;
clusterLabels: boolean;
clusterPoints: boolean;
show: boolean;
readonly clusterEvent: Event;
destroy(): void;
}
interface EntityClusterOptions {
enabled?: boolean;
pixelRange?: number;
minimumClusterSize?: number;
clusterBillboards?: boolean;
clusterLabels?: boolean;
clusterPoints?: boolean;
}interface PositionProperty extends Property {
referenceFrame: ReferenceFrame;
getValue(time: JulianDate, result?: Cartesian3): Cartesian3;
getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3;
}
interface BillboardGraphicsOptions {
show?: Property | boolean;
image?: Property | string;
scale?: Property | number;
pixelOffset?: Property | Cartesian2;
eyeOffset?: Property | Cartesian3;
horizontalOrigin?: Property | HorizontalOrigin;
verticalOrigin?: Property | VerticalOrigin;
color?: Property | Color;
rotation?: Property | number;
alignedAxis?: Property | Cartesian3;
sizeInMeters?: Property | boolean;
width?: Property | number;
height?: Property | number;
scaleByDistance?: Property | NearFarScalar;
translucencyByDistance?: Property | NearFarScalar;
pixelOffsetScaleByDistance?: Property | NearFarScalar;
imageSubRegion?: Property | BoundingRectangle;
distanceDisplayCondition?: Property | DistanceDisplayCondition;
disableDepthTestDistance?: Property | number;
}
interface PointGraphicsOptions {
show?: Property | boolean;
pixelSize?: Property | number;
heightReference?: Property | HeightReference;
color?: Property | Color;
outlineColor?: Property | Color;
outlineWidth?: Property | number;
scaleByDistance?: Property | NearFarScalar;
translucencyByDistance?: Property | NearFarScalar;
distanceDisplayCondition?: Property | DistanceDisplayCondition;
disableDepthTestDistance?: Property | number;
}
interface LabelGraphicsOptions {
show?: Property | boolean;
text?: Property | string;
font?: Property | string;
style?: Property | LabelStyle;
scale?: Property | number;
showBackground?: Property | boolean;
backgroundColor?: Property | Color;
backgroundPadding?: Property | Cartesian2;
pixelOffset?: Property | Cartesian2;
eyeOffset?: Property | Cartesian3;
horizontalOrigin?: Property | HorizontalOrigin;
verticalOrigin?: Property | VerticalOrigin;
heightReference?: Property | HeightReference;
fillColor?: Property | Color;
outlineColor?: Property | Color;
outlineWidth?: Property | number;
translucencyByDistance?: Property | NearFarScalar;
pixelOffsetScaleByDistance?: Property | NearFarScalar;
scaleByDistance?: Property | NearFarScalar;
distanceDisplayCondition?: Property | DistanceDisplayCondition;
disableDepthTestDistance?: Property | number;
}
interface InterpolationOptions {
interpolationDegree?: number;
interpolationAlgorithm?: InterpolationAlgorithm;
}
enum ReferenceFrame {
FIXED = 0,
INERTIAL = 1
}
enum HeightReference {
NONE = 0,
CLAMP_TO_GROUND = 1,
RELATIVE_TO_GROUND = 2
}
enum ExtrapolationType {
NONE = 0,
HOLD = 1,
EXTRAPOLATE = 2
}