From eef9fcdc42581e755f35a12be241d71b8bf5aa87 Mon Sep 17 00:00:00 2001 From: Crocsx Date: Wed, 4 Mar 2020 03:35:16 +0900 Subject: [PATCH] [@types/cesium] Add PropertyBag (#42782) * property Bag * add entity definition --- types/cesium/index.d.ts | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts index 42239aa227..104053dfe1 100644 --- a/types/cesium/index.d.ts +++ b/types/cesium/index.d.ts @@ -116,6 +116,18 @@ declare namespace Cesium { setTemplateValues(params: any, useAsDefault?: boolean): void; } + class PropertyBag { + readonly definitionChanged: Event; + readonly isConstant: boolean; + propertyNames: string[]; + + addProperty(propertyName: string, value?: any, createPropertyCallback?: (value?: any) => void): void; + equals(other?: Property): boolean; + getValue(time: JulianDate, result?: object): object; + hasProperty(propertyName: string): boolean; + merge(source: object, createPropertyCallback?: (value?: any) => void): void; + } + class ArcGisImageServerTerrainProvider extends TerrainProvider { constructor(options: { url: string; token?: string; proxy?: any; tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid; credit?: Credit | string }); } @@ -2246,7 +2258,7 @@ declare namespace Cesium { polyline: PolylineGraphics; polylineVolume: PolylineVolumeGraphics; position: PositionProperty; - properties: any; + properties: PropertyBag; propertyNames: any[]; rectangle: RectangleGraphics; show: boolean; @@ -2276,6 +2288,7 @@ declare namespace Cesium { polygon?: PolygonGraphics; polyline?: PolylineGraphics; polylineVolume?: PolylineVolumeGraphics; + properties?: PropertyBag; rectangle?: RectangleGraphics; wall?: WallGraphics }); @@ -2477,7 +2490,7 @@ declare namespace Cesium { } class ModelGraphics { - articulations: any; // PropertyBag + articulations: PropertyBag; clampAnimations: Property | boolean; clippingPlanes: Property | ClippingPlaneCollection; color: Property | Color; @@ -2491,7 +2504,7 @@ declare namespace Cesium { lightColor: Property | Cartesian3; maximumScale: Property | number; minimumPixelSize: Property | number; - nodeTransformations: any; // PropertyBag + nodeTransformations: PropertyBag; runAnimations: Property | boolean; scale: Property | number; shadows: Property | ShadowMode; @@ -2518,8 +2531,8 @@ declare namespace Cesium { imageBasedLightingFactor?: Property | Cartesian2; lightColor?: Property | Cartesian3; distanceDisplayCondition?: Property | DistanceDisplayCondition; - nodeTransformations?: any; // PropertyBag - articulations?: any; // PropertyBag + nodeTransformations?: PropertyBag; + articulations?: PropertyBag; clippingPlanes?: Property | ClippingPlaneCollection; }); clone(result?: ModelGraphics): ModelGraphics;