diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts index 7cdd5f178d..0b9f690023 100644 --- a/types/cesium/index.d.ts +++ b/types/cesium/index.d.ts @@ -1714,6 +1714,7 @@ declare namespace Cesium { translucencyByDistance?: Property; pixelOffsetScaleByDistance?: Property; imageSubRegion?: Property + heightReference?: Property; }); clone(result?: BillboardGraphics): BillboardGraphics; merge(source: BillboardGraphics): BillboardGraphics; @@ -2284,6 +2285,7 @@ declare namespace Cesium { pixelOffset?: Property; translucencyByDistance?: Property; pixelOffsetScaleByDistance?: Property + heightReference?: Property; }); clone(result?: LabelGraphics): LabelGraphics; merge(source: LabelGraphics): LabelGraphics; @@ -2901,7 +2903,7 @@ declare namespace Cesium { getRectangleCameraCoordinates(rectangle: Rectangle, result?: Cartesian3): Cartesian3; look(axis: Cartesian3, angle?: number): void; lookAt(target: Cartesian3, offset: Cartesian3 | HeadingPitchRange): void; - lookAtTransform(transform: Matrix4, offset: Cartesian3 | HeadingPitchRange): void; + lookAtTransform(transform: Matrix4, offset?: Cartesian3 | HeadingPitchRange): void; lookDown(amount?: number): void; lookLeft(amount?: number): void; lookRight(amount?: number): void; @@ -3066,24 +3068,35 @@ declare namespace Cesium { class Globe { atmosphereBrightnessShift: number; - atmosphereSaturationShift: number; atmosphereHueShift: number; - terrainProvider: TerrainProvider; - northPoleColor: Cartesian3; - southPoleColor: Cartesian3; - show: boolean; - oceanNormalMapUrl: string; - depthTestAgainstTerrain: boolean; - maximumScreenSpaceError: number; - tileCacheSize: number; - enableLighting: boolean; - lightingFadeOutDistance: number; - lightingFadeInDistance: number; - showWaterEffect: boolean; - ellipsoid: Ellipsoid; - imageryLayers: ImageryLayerCollection; + atmosphereSaturationShift: number; baseColor: Color; cartographicLimitRectangle: Rectangle; + depthTestAgainstTerrain: boolean; + ellipsoid: Ellipsoid; + enableLighting: boolean; + fillHighlightColor: Color; + imageryLayers: ImageryLayerCollection; + readonly imageryLayersUpdatedEvent: Event; + lightingFadeInDistance: number; + lightingFadeOutDistance: number; + loadingDescendantLimit: number; + material: Material; + maximumScreenSpaceError: number; + nightFadeInDistance: number; + nightFadeOutDistance: number; + northPoleColor: Cartesian3; + oceanNormalMapUrl: string; + preloadSiblings: boolean; + preloadAncestors: boolean; + show: boolean; + showWaterEffect: boolean; + southPoleColor: Cartesian3; + terrainProvider: TerrainProvider; + readonly terrainProviderChanged: Event<[TerrainProvider]>; + tileCacheSize: number; + tileLoadProgressEvent: Event<[number]>; + readonly tilesLoaded: boolean; constructor(ellipsoid?: Ellipsoid); pick(ray: Ray, scene: Scene, result?: Cartesian3): Cartesian3; getHeight(cartographic: Cartographic): number; diff --git a/types/cesium/test/cesium-global.test.ts b/types/cesium/test/cesium-global.test.ts index 4deeb0d850..dfbdd2e837 100644 --- a/types/cesium/test/cesium-global.test.ts +++ b/types/cesium/test/cesium-global.test.ts @@ -52,3 +52,16 @@ const quat: Cesium.Quaternion = Cesium.Quaternion.fromHeadingPitchRoll(hpr); const matrix: Cesium.Matrix3 = Cesium.Matrix3.fromHeadingPitchRoll(hpr); const webgl = Cesium.WebGLConstants.ALPHA; + +viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); + +const billboard = new Cesium.BillboardGraphics({ + heightReference: new Cesium.ConstantProperty(Cesium.HeightReference.CLAMP_TO_GROUND), +}); + +const label = new Cesium.LabelGraphics({ + heightReference: new Cesium.ConstantProperty(Cesium.HeightReference.CLAMP_TO_GROUND), +}); + +viewer.scene.globe.tileLoadProgressEvent.addEventListener((progress: number) => progress); +viewer.scene.globe.terrainProviderChanged.addEventListener((provider: Cesium.TerrainProvider) => provider); diff --git a/types/cesium/test/cesium-module.test.ts b/types/cesium/test/cesium-module.test.ts index 461362f361..f127cc6655 100644 --- a/types/cesium/test/cesium-module.test.ts +++ b/types/cesium/test/cesium-module.test.ts @@ -54,3 +54,16 @@ const quat: Cesium.Quaternion = Cesium.Quaternion.fromHeadingPitchRoll(hpr); const matrix: Cesium.Matrix3 = Cesium.Matrix3.fromHeadingPitchRoll(hpr); const webgl = Cesium.WebGLConstants.ALPHA; + +viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); + +const billboard = new Cesium.BillboardGraphics({ + heightReference: new Cesium.ConstantProperty(Cesium.HeightReference.CLAMP_TO_GROUND), +}); + +const label = new Cesium.LabelGraphics({ + heightReference: new Cesium.ConstantProperty(Cesium.HeightReference.CLAMP_TO_GROUND), +}); + +viewer.scene.globe.tileLoadProgressEvent.addEventListener((progress: number) => progress); +viewer.scene.globe.terrainProviderChanged.addEventListener((provider: Cesium.TerrainProvider) => provider);