bruce-cesium 7.3.5 → 7.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,18 @@ export declare namespace DisplacedSurfacePrimitive {
33
33
  floor?: number;
34
34
  fillGaps?: boolean;
35
35
  }
36
+ /**
37
+ * Makes the sheet read as water rather than as a coloured surface.
38
+ */
39
+ export interface IWater {
40
+ wavelength?: number;
41
+ amplitude?: number;
42
+ speed?: number;
43
+ reflectivity?: number;
44
+ skyColor?: Color.IColor;
45
+ glossiness?: number;
46
+ sunIntensity?: number;
47
+ }
36
48
  export interface IOptions {
37
49
  extent: IExtent;
38
50
  tileSkirts?: boolean;
@@ -49,6 +61,7 @@ export declare namespace DisplacedSurfacePrimitive {
49
61
  highColor?: Color.IColor;
50
62
  rampStops?: IRampStop[] | null;
51
63
  groundClearance?: IGroundClearance;
64
+ water?: IWater | null;
52
65
  }
53
66
  interface IPatch {
54
67
  u0: number;
@@ -94,7 +107,19 @@ export declare namespace DisplacedSurfacePrimitive {
94
107
  private maskGroundRequested;
95
108
  private maskGroundLevel;
96
109
  private readonly maskFillValue;
110
+ private water;
111
+ private waterStartMs;
112
+ private waveOrigin;
97
113
  constructor(options: IOptions, hasCoverage?: (patch: IPatch) => boolean);
114
+ GetWater(): IWater | null;
115
+ /**
116
+ * Shades the sheet as water, or stops. Null goes back to the relief shading.
117
+ *
118
+ * Nothing is rebuilt: no mesh, no texture and no shader, since the water path is a branch in
119
+ * the fragment shader the whole scene already carries. So this is cheap enough to drive from
120
+ * a control the user is dragging.
121
+ */
122
+ SetWater(water: IWater | null): void;
98
123
  GetFollowsGround(): boolean;
99
124
  GetPixelPlacement(): string | undefined;
100
125
  GetBaseHeight(): number;
@@ -132,6 +157,10 @@ export declare namespace DisplacedSurfacePrimitive {
132
157
  private requestMaskGround;
133
158
  private syncMaskTextures;
134
159
  private syncGroundTexture;
160
+ private extentMetres;
161
+ private wavePhase;
162
+ private wavePeriod;
163
+ private updateWaveOrigin;
135
164
  private metresPerTexel;
136
165
  private syncRampTexture;
137
166
  private syncTexture;
@@ -45,6 +45,12 @@ export declare namespace EntityRenderEnginePolygon {
45
45
  * @param clearance Pass null to drop the regions again.
46
46
  */
47
47
  function SetGroundClearance(cEntities: any[], clearance: DisplacedSurfacePrimitive.IGroundClearance | null): number;
48
+ /**
49
+ * Shades every rendered polygon in a set as water rather than as a coloured surface.
50
+ * @param cEntities
51
+ * @param water Pass null to go back to the relief shading.
52
+ */
53
+ function SetWater(cEntities: any[], water: DisplacedSurfacePrimitive.IWater | null): number;
48
54
  /**
49
55
  * Disposes a cEntity's TextureFrameSeriesAnimator.Animator (if any).
50
56
  */
@@ -1,6 +1,7 @@
1
1
  import * as Cesium from "cesium";
2
2
  import { VisualsRegister } from "../rendering/visuals-register";
3
3
  import { IDictionary } from "bruce-models";
4
+ type Graphic = Cesium.Cesium3DTileFeature | Cesium.ModelGraphics | Cesium.PolygonGraphics | Cesium.PolylineGraphics | Cesium.CorridorGraphics | Cesium.PointGraphics | Cesium.BillboardGraphics | Cesium.EllipseGraphics;
4
5
  /**
5
6
  * Internal utility to help with managing Cesium Entity styling.
6
7
  * Do not expose this to public as it will likely be killed and replaced with something that do animated changes.
@@ -12,6 +13,7 @@ export declare namespace CesiumEntityStyler {
12
13
  entity: VisualsRegister.Visual;
13
14
  requestRender?: boolean;
14
15
  }): void;
16
+ function GetDefaultColor(viewer: Cesium.Viewer, graphic: Graphic): Cesium.Color;
15
17
  function BakeDefaultColor(params: {
16
18
  viewer: Cesium.Viewer;
17
19
  entity: VisualsRegister.Visual;
@@ -108,3 +110,4 @@ export declare namespace CesiumEntityStyler {
108
110
  requestRender?: boolean;
109
111
  }): void;
110
112
  }
113
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { Widget } from "./widget";
2
2
  import { BruceEvent } from "bruce-models";
3
- declare enum ECursor {
3
+ export declare enum ECursor {
4
4
  Select = "select",
5
5
  Pan = "pan",
6
6
  Measure = "measure"
@@ -17,6 +17,10 @@ export declare class WidgetCursorBar extends Widget.AWidget {
17
17
  private _cesiumEventRemoval;
18
18
  OnCursorChange: BruceEvent<ECursor>;
19
19
  constructor(params: Widget.IParams);
20
+ /**
21
+ * @param cursor
22
+ */
23
+ SetCursor(cursor: ECursor): void;
20
24
  Dispose(): void;
21
25
  private _generateStyles;
22
26
  private _generateElement;
@@ -32,4 +36,3 @@ export declare class WidgetCursorBar extends Widget.AWidget {
32
36
  private _disposeCesiumEvent;
33
37
  private _listenSelection;
34
38
  }
35
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bruce-cesium",
3
- "version": "7.3.5",
3
+ "version": "7.3.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/bruce-cesium.umd.js",
@@ -83,7 +83,7 @@
83
83
  "typescript": "^5.0.4"
84
84
  },
85
85
  "dependencies": {
86
- "bruce-models": "^7.1.102",
86
+ "bruce-models": "^7.1.106",
87
87
  "tslib": "^2.4.1"
88
88
  }
89
89
  }