bruce-cesium 7.3.3 → 7.3.5
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.
- package/dist/bruce-cesium.es5.js +4471 -3385
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +4200 -3114
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/internal/code-logic-exceptions.js +77 -0
- package/dist/lib/internal/code-logic-exceptions.js.map +1 -0
- package/dist/lib/rendering/cesium-animated-property.js +210 -34
- package/dist/lib/rendering/cesium-animated-property.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js +39 -58
- package/dist/lib/rendering/entity-render-engine-model3d.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +43 -64
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js +1 -16
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js +5 -18
- package/dist/lib/rendering/entity-render-engine-polyline.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +67 -0
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +6 -2
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/historic-utils.js +18 -1
- package/dist/lib/rendering/render-managers/common/historic-utils.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters-historic.js +349 -0
- package/dist/lib/rendering/render-managers/common/shared-getters-historic.js.map +1 -0
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +66 -19
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +26 -15
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/other/assembly-render-manager.js +265 -14
- package/dist/lib/rendering/render-managers/other/assembly-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +123 -28
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/visual-register-culler.js +9 -120
- package/dist/lib/rendering/visual-register-culler.js.map +1 -1
- package/dist/lib/utils/drawing-utils.js +182 -10
- package/dist/lib/utils/drawing-utils.js.map +1 -1
- package/dist/lib/utils/view-utils.js +13 -0
- package/dist/lib/utils/view-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/internal/code-logic-exceptions.d.ts +37 -0
- package/dist/types/rendering/cesium-animated-property.d.ts +55 -1
- package/dist/types/rendering/entity-render-engine.d.ts +33 -1
- package/dist/types/rendering/menu-item-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/common/historic-utils.d.ts +6 -0
- package/dist/types/rendering/render-managers/common/shared-getters-historic.d.ts +115 -0
- package/dist/types/rendering/render-managers/entities/entities-ids-render-manager.d.ts +5 -0
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +5 -0
- package/dist/types/rendering/render-managers/other/assembly-render-manager.d.ts +42 -0
- package/dist/types/rendering/render-managers/tilesets/tileset-cad-render-manager.d.ts +42 -2
- package/dist/types/utils/drawing-utils.d.ts +34 -0
- package/dist/types/utils/view-utils.d.ts +5 -0
- package/package.json +2 -2
|
@@ -117,11 +117,44 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
117
117
|
IsDone(): boolean;
|
|
118
118
|
GetValue(): number;
|
|
119
119
|
}
|
|
120
|
+
interface IAnimateAttitude {
|
|
121
|
+
pitch: number | null;
|
|
122
|
+
roll: number | null;
|
|
123
|
+
}
|
|
120
124
|
interface IAnimateSeriesPos {
|
|
121
125
|
pos3d: Cesium.Cartesian3;
|
|
122
126
|
dateTime: Date;
|
|
123
127
|
heading: number | null;
|
|
128
|
+
pitch?: number | null;
|
|
129
|
+
roll?: number | null;
|
|
124
130
|
}
|
|
131
|
+
const TRAIL_REAL_SECONDS = 20;
|
|
132
|
+
const TRAIL_MIN_MS: number;
|
|
133
|
+
const TRAIL_MAX_MS: number;
|
|
134
|
+
const TRAIL_MAX_POINTS = 500;
|
|
135
|
+
const TRAIL_MIN_POINTS = 8;
|
|
136
|
+
/**
|
|
137
|
+
* Returns how much scene time a trail should cover, for a clock moving at this rate.
|
|
138
|
+
* @param ratePerSecondMs milliseconds of scene time per real second.
|
|
139
|
+
* @param realSeconds how much watching the trail should represent.
|
|
140
|
+
*/
|
|
141
|
+
function TrailSpanFor(ratePerSecondMs: number, realSeconds?: number, minMs?: number, maxMs?: number): number;
|
|
142
|
+
/**
|
|
143
|
+
* Returns the positions a movement trail should run through, for a playhead at this time.
|
|
144
|
+
* @param params
|
|
145
|
+
*/
|
|
146
|
+
function TrailPositionsFrom(params: {
|
|
147
|
+
positions: IAnimateSeriesPos[];
|
|
148
|
+
nowTimeMs: number;
|
|
149
|
+
ratePerSecondMs: number;
|
|
150
|
+
currentPos?: Cesium.Cartesian3;
|
|
151
|
+
}): Cesium.Cartesian3[];
|
|
152
|
+
/**
|
|
153
|
+
* Thins a run of positions down to at most maxPoints, keeping the first and last.
|
|
154
|
+
* @param posses
|
|
155
|
+
* @param maxPoints
|
|
156
|
+
*/
|
|
157
|
+
function DecimateSeries(posses: Cesium.Cartesian3[], maxPoints?: number): Cesium.Cartesian3[];
|
|
125
158
|
/**
|
|
126
159
|
* Animates a position from a set of provided positions in time.
|
|
127
160
|
* This will return a position across the provided positions based on the current time.
|
|
@@ -165,6 +198,7 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
165
198
|
* Otherwise returns the Cesium viewer time.
|
|
166
199
|
*/
|
|
167
200
|
private getTimeMs;
|
|
201
|
+
private ratePerSecondMs;
|
|
168
202
|
SetUseRealTime(value: boolean): void;
|
|
169
203
|
AddPosition(pos: IAnimateSeriesPos): void;
|
|
170
204
|
UpdatePitchRoll(pitch: number, roll: number): void;
|
|
@@ -185,6 +219,11 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
185
219
|
*/
|
|
186
220
|
private updateRealTimePosition;
|
|
187
221
|
GetSeries(): Cesium.Cartesian3[];
|
|
222
|
+
/**
|
|
223
|
+
* Returns the heading carried by the last record at or before the playhead, in degrees, or
|
|
224
|
+
* null when no record in range names one.
|
|
225
|
+
*/
|
|
226
|
+
GetHeadingDegrees(): number | null;
|
|
188
227
|
GetOrient(): Cesium.Quaternion;
|
|
189
228
|
GetCurrentVelocity(): Cesium.Cartesian3;
|
|
190
229
|
SupplementSeries(newSeries: IAnimateSeriesPos[]): void;
|
|
@@ -192,11 +231,20 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
192
231
|
HasPositionForDateTime(dateTime: Date): boolean;
|
|
193
232
|
GetPositionCount(): number;
|
|
194
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Returns a position at the height its graphic is actually drawn at.
|
|
236
|
+
* Respecting the height ref means it is pointing the right way when we orient based on movement.
|
|
237
|
+
* @param viewer
|
|
238
|
+
* @param pos3d
|
|
239
|
+
* @param heightRef
|
|
240
|
+
*/
|
|
241
|
+
function GetDrawnHeightPos3d(viewer: Cesium.Viewer, pos3d: Cesium.Cartesian3, heightRef: Cesium.HeightReference): Cesium.Cartesian3 | null;
|
|
195
242
|
function GetSeriesPossesForHistoricEntity(viewer: Cesium.Viewer, dataHeightRef: Cesium.HeightReference, heightRef: Cesium.HeightReference, historic: EntityHistoricData.IData[]): CesiumAnimatedProperty.IAnimateSeriesPos[];
|
|
196
243
|
class AnimateTPositionSeries {
|
|
197
244
|
private viewer;
|
|
198
245
|
private positions;
|
|
199
246
|
private onUpdate;
|
|
247
|
+
private lastCalcAttitude;
|
|
200
248
|
private onDone?;
|
|
201
249
|
private onRangeChangeCallback?;
|
|
202
250
|
private lastCalcTime;
|
|
@@ -212,7 +260,7 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
212
260
|
constructor(params: {
|
|
213
261
|
viewer: Cesium.Viewer;
|
|
214
262
|
posses: IAnimateSeriesPos[];
|
|
215
|
-
onUpdate: (position: Cesium.Cartesian3, heading: number | null) => void;
|
|
263
|
+
onUpdate: (position: Cesium.Cartesian3, heading: number | null, attitude?: IAnimateAttitude) => void;
|
|
216
264
|
onDone?: () => void;
|
|
217
265
|
onRangeChange?: () => void;
|
|
218
266
|
});
|
|
@@ -229,6 +277,11 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
229
277
|
minDate: Date | null;
|
|
230
278
|
maxDate: Date | null;
|
|
231
279
|
};
|
|
280
|
+
/**
|
|
281
|
+
* Returns the positions a movement trail through this series should run through.
|
|
282
|
+
* The same window an Entity's own trail uses, so a root trail matches one drawn per Entity.
|
|
283
|
+
*/
|
|
284
|
+
GetSeries(): Cesium.Cartesian3[];
|
|
232
285
|
/**
|
|
233
286
|
* Trigger the onRangeChange callback to request more data.
|
|
234
287
|
*/
|
|
@@ -237,6 +290,7 @@ export declare namespace CesiumAnimatedProperty {
|
|
|
237
290
|
* Stop the animation and call the onDone callback if provided.
|
|
238
291
|
*/
|
|
239
292
|
stop(): void;
|
|
293
|
+
private attitudeAt;
|
|
240
294
|
private update;
|
|
241
295
|
private interpolatePos3dOverTime;
|
|
242
296
|
private easeInOutQuad;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Cesium from "cesium";
|
|
2
|
-
import { Entity, BruceApi, ZoomControl, IDictionary, EntityHistoricData } from "bruce-models";
|
|
2
|
+
import { Entity, BruceApi, ZoomControl, IDictionary, EntityHistoricData, EntityTag } from "bruce-models";
|
|
3
3
|
import { RenderManager } from "./render-managers/render-manager";
|
|
4
4
|
import { VisualsRegister } from "./visuals-register";
|
|
5
5
|
import { EntityRenderEnginePoint } from "./entity-render-engine-point";
|
|
@@ -141,6 +141,38 @@ export declare namespace EntityRenderEngine {
|
|
|
141
141
|
const Render: typeof EntityRenderEngineModel3d.Render;
|
|
142
142
|
const RenderGroup: typeof EntityRenderEngineModel3d.RenderGroup;
|
|
143
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Returns what a style's altitude option means as a Cesium height reference.
|
|
146
|
+
* @param style any style section carrying an altitudeOption, eg. modelStyle or polylineStyle.
|
|
147
|
+
* @param defaultRef what to use when the style names no option.
|
|
148
|
+
*/
|
|
149
|
+
function GetHeightRef(style: any, defaultRef?: Cesium.HeightReference): Cesium.HeightReference;
|
|
150
|
+
/**
|
|
151
|
+
* Folds a height reference onto what a Cesium polyline can actually express.
|
|
152
|
+
* A polyline carries a clampToGround flag and nothing else, so relative to ground has no
|
|
153
|
+
* meaning there and the configured option falls back the way the polyline engine has always
|
|
154
|
+
* read it, as an absolute height.
|
|
155
|
+
* @param heightRef what the style asked for
|
|
156
|
+
*/
|
|
157
|
+
function GetHeightRefPolyline(heightRef: Cesium.HeightReference): Cesium.HeightReference;
|
|
158
|
+
/**
|
|
159
|
+
* How a movement trail should be drawn, or null when it should not be drawn at all.
|
|
160
|
+
*/
|
|
161
|
+
interface ITrackStyle {
|
|
162
|
+
color: Cesium.Color;
|
|
163
|
+
width: number;
|
|
164
|
+
}
|
|
165
|
+
const TRACK_DEFAULT_WIDTH = 2;
|
|
166
|
+
const TRACK_DEFAULT_COLOR = "rgba(255, 193, 7, 0.8)";
|
|
167
|
+
/**
|
|
168
|
+
* Resolves a movement trail's colour, width and height reference from the polyline style.
|
|
169
|
+
* @param params
|
|
170
|
+
*/
|
|
171
|
+
function GetTrackStyle(params: {
|
|
172
|
+
entity: Entity.IEntity;
|
|
173
|
+
style: any;
|
|
174
|
+
tags?: EntityTag.ITag[];
|
|
175
|
+
}): ITrackStyle | null;
|
|
144
176
|
/**
|
|
145
177
|
* @param min
|
|
146
178
|
* @param max
|
|
@@ -17,6 +17,12 @@ export declare namespace HistoricFetchOrder {
|
|
|
17
17
|
* Returns how long to wait between historic refreshes for a set of this size.
|
|
18
18
|
*/
|
|
19
19
|
function IntervalFor(entityCount: number, minMs?: number, maxMs?: number): number;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the cadence for a set of this size on a clock running at this rate.
|
|
22
|
+
* @param entityCount
|
|
23
|
+
* @param multiplier the viewer clock's, ie. scene seconds per real second
|
|
24
|
+
*/
|
|
25
|
+
function IntervalForClock(entityCount: number, multiplier: number): number;
|
|
20
26
|
const DEFAULT_BANDS: number[];
|
|
21
27
|
/**
|
|
22
28
|
* Where the user is actually looking, which is not the same as where the camera is.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Entity, IDictionary } from "bruce-models";
|
|
2
|
+
/**
|
|
3
|
+
* The shared read path for Entities whose position comes from the clock.
|
|
4
|
+
*/
|
|
5
|
+
export declare namespace SharedHistoricGetters {
|
|
6
|
+
const DEFAULT_MIN_INTERVAL_MS = 250;
|
|
7
|
+
const DEFAULT_FRESH_MS = 200;
|
|
8
|
+
const DEFAULT_MAX_INTERVAL_MS = 3000;
|
|
9
|
+
const IDLE_DOUBLINGS = 6;
|
|
10
|
+
const FEED_MAX_INTERVAL_MS = 15000;
|
|
11
|
+
/**
|
|
12
|
+
* What one manager wants: these Entities, as at this instant.
|
|
13
|
+
*/
|
|
14
|
+
interface IAsk {
|
|
15
|
+
subscriberId: string;
|
|
16
|
+
entityIds: string[];
|
|
17
|
+
at: number;
|
|
18
|
+
force?: boolean;
|
|
19
|
+
}
|
|
20
|
+
function SignatureOf(entity: Entity.IEntity): string;
|
|
21
|
+
/**
|
|
22
|
+
* Reads a set of Entities at an instant.
|
|
23
|
+
*/
|
|
24
|
+
type Read = (entityIds: string[], at: number) => Promise<Entity.IEntity[]>;
|
|
25
|
+
/**
|
|
26
|
+
* One read path, shared by every manager reading the same Entities the same way.
|
|
27
|
+
*/
|
|
28
|
+
class Lane {
|
|
29
|
+
private params;
|
|
30
|
+
private pending;
|
|
31
|
+
private inFlight;
|
|
32
|
+
private lastSentAt;
|
|
33
|
+
private pumpTimeout;
|
|
34
|
+
private pumpScheduled;
|
|
35
|
+
private disposed;
|
|
36
|
+
private held;
|
|
37
|
+
private heldSignatures;
|
|
38
|
+
private idleReads;
|
|
39
|
+
private heldInternalIds;
|
|
40
|
+
private feedRemoval;
|
|
41
|
+
private feedWired;
|
|
42
|
+
constructor(params: {
|
|
43
|
+
read: Read;
|
|
44
|
+
getMinIntervalMs?: () => number;
|
|
45
|
+
freshMs?: number;
|
|
46
|
+
maxIntervalMs?: number;
|
|
47
|
+
signatureOf?: (entity: Entity.IEntity) => string;
|
|
48
|
+
subscribeToChanges?: (onChanged: (rangeString: string) => void) => (() => void) | null;
|
|
49
|
+
isFeedConnected?: () => boolean;
|
|
50
|
+
now?: () => number;
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Asks for these Entities at this instant, resolving with them however the lane gets there:
|
|
54
|
+
* from the held answer, from a read already about to happen, or from one this ask starts.
|
|
55
|
+
*/
|
|
56
|
+
Request(ask: IAsk): Promise<Entity.IEntity[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Forgets a subscriber, for a manager that has been disposed while it was waiting.
|
|
59
|
+
*/
|
|
60
|
+
Drop(subscriberId: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Tells the lane that records it holds have changed, so its next read happens on the caller's
|
|
63
|
+
* cadence rather than behind whatever backoff a quiet spell had earned.
|
|
64
|
+
*/
|
|
65
|
+
NotifyChanged(): void;
|
|
66
|
+
/**
|
|
67
|
+
* The same, for a feed event naming Entity internal ids as ranges.
|
|
68
|
+
* @param rangeString as reported by the record change feed.
|
|
69
|
+
*/
|
|
70
|
+
NotifyChangedRange(rangeString: string): void;
|
|
71
|
+
Dispose(): void;
|
|
72
|
+
/**
|
|
73
|
+
* How many reads in a row have come back unchanged, which is what the wait is scaled by.
|
|
74
|
+
*/
|
|
75
|
+
get IdleReads(): number;
|
|
76
|
+
/**
|
|
77
|
+
* The wait the lane would apply before its next read,
|
|
78
|
+
* ie. the caller's cadence after however far the idle backoff has widened it.
|
|
79
|
+
*/
|
|
80
|
+
get IntervalMs(): number;
|
|
81
|
+
/**
|
|
82
|
+
* What the lane is currently holding, for a caller that wants it without asking for a read.
|
|
83
|
+
*/
|
|
84
|
+
get Held(): {
|
|
85
|
+
at: number;
|
|
86
|
+
byId: IDictionary<Entity.IEntity>;
|
|
87
|
+
};
|
|
88
|
+
private intervalNow;
|
|
89
|
+
private freshAnswerFor;
|
|
90
|
+
private wireFeed;
|
|
91
|
+
private schedulePump;
|
|
92
|
+
private pump;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The lanes in play, keyed so that two managers reading the same Entities the same way land on the same one.
|
|
96
|
+
*/
|
|
97
|
+
class Cache {
|
|
98
|
+
private lanes;
|
|
99
|
+
/**
|
|
100
|
+
* Returns the lane for this endpoint and attribute key, creating it on first use.
|
|
101
|
+
* @param params
|
|
102
|
+
*/
|
|
103
|
+
GetOrCreateLane(params: {
|
|
104
|
+
baseUrl: string;
|
|
105
|
+
attrKey?: string;
|
|
106
|
+
read: Read;
|
|
107
|
+
getMinIntervalMs?: () => number;
|
|
108
|
+
freshMs?: number;
|
|
109
|
+
maxIntervalMs?: number;
|
|
110
|
+
subscribeToChanges?: (onChanged: (rangeString: string) => void) => (() => void) | null;
|
|
111
|
+
isFeedConnected?: () => boolean;
|
|
112
|
+
}): Lane;
|
|
113
|
+
Dispose(): void;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -3,6 +3,7 @@ import * as Cesium from "cesium";
|
|
|
3
3
|
import { CesiumViewMonitor } from "../../../viewer/cesium-view-monitor";
|
|
4
4
|
import { VisualsRegister } from "../../visuals-register";
|
|
5
5
|
import { RenderManager } from "../render-manager";
|
|
6
|
+
import { SharedHistoricGetters } from "../common/shared-getters-historic";
|
|
6
7
|
/**
|
|
7
8
|
* Render manager for rendering an array of entity ids.
|
|
8
9
|
* This will render them in batches to avoid overloading the viewer.
|
|
@@ -30,12 +31,15 @@ export declare namespace EntitiesIdsRenderManager {
|
|
|
30
31
|
private renderQueue;
|
|
31
32
|
private renderQueueForceFlags;
|
|
32
33
|
private reRenderState;
|
|
34
|
+
private sharedHistoric;
|
|
35
|
+
private historicLane;
|
|
33
36
|
constructor(params: {
|
|
34
37
|
viewer: Cesium.Viewer;
|
|
35
38
|
register: VisualsRegister.Register;
|
|
36
39
|
apiGetter: BruceApi.IGetter;
|
|
37
40
|
monitor: CesiumViewMonitor.Monitor;
|
|
38
41
|
item: MenuItem.Item.IEntityIds;
|
|
42
|
+
sharedHistoric?: SharedHistoricGetters.Cache;
|
|
39
43
|
});
|
|
40
44
|
Init(params?: {
|
|
41
45
|
item?: MenuItem.Item.IEntityIds;
|
|
@@ -52,6 +56,7 @@ export declare namespace EntitiesIdsRenderManager {
|
|
|
52
56
|
zoomControl?: ZoomControl.IItem[];
|
|
53
57
|
queueRerender?: boolean;
|
|
54
58
|
}): void;
|
|
59
|
+
private getHistoricLane;
|
|
55
60
|
private onGetterUpdate;
|
|
56
61
|
private renderEntities;
|
|
57
62
|
/**
|
|
@@ -111,6 +111,11 @@ export declare namespace EntitiesRenderManager {
|
|
|
111
111
|
private gatherHistoric;
|
|
112
112
|
private doRenderAsIndividuals;
|
|
113
113
|
get HandoffKey(): string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Returns whether this item needs its historic records fetched.
|
|
116
|
+
* @param item
|
|
117
|
+
*/
|
|
118
|
+
static NeedsHistoricRecords(item: MenuItem.Item.IEntities): boolean;
|
|
114
119
|
static GetHandoffKey(item: MenuItem.Item.IEntities): string | null;
|
|
115
120
|
/**
|
|
116
121
|
* Everything about a menu item that changes how its entities are drawn, as a comparable string.
|
|
@@ -31,6 +31,13 @@ export declare namespace AssemblyRenderManager {
|
|
|
31
31
|
private modelSpace;
|
|
32
32
|
get ModelSpace(): boolean;
|
|
33
33
|
private rootId;
|
|
34
|
+
private rootPos3d;
|
|
35
|
+
private rootHeading;
|
|
36
|
+
private children;
|
|
37
|
+
private trackEntity;
|
|
38
|
+
private viewerDateTimeChangeRemoval;
|
|
39
|
+
private historicGatherer;
|
|
40
|
+
private historicAnimation;
|
|
34
41
|
constructor(params: {
|
|
35
42
|
viewer: Cesium.Viewer;
|
|
36
43
|
register: VisualsRegister.Register;
|
|
@@ -38,6 +45,39 @@ export declare namespace AssemblyRenderManager {
|
|
|
38
45
|
item: MenuItem.Item.IAssembly;
|
|
39
46
|
modelSpace?: boolean;
|
|
40
47
|
});
|
|
48
|
+
/**
|
|
49
|
+
* Returns whether this Assembly's root moves over time.
|
|
50
|
+
* @param item
|
|
51
|
+
*/
|
|
52
|
+
static IsHistoric(item: MenuItem.Item.IAssembly): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns what a record's altitude means for this item, from its style's altitude option.
|
|
55
|
+
* @param item
|
|
56
|
+
*/
|
|
57
|
+
static GetRecordHeightRef(item: MenuItem.Item.IAssembly): Cesium.HeightReference;
|
|
58
|
+
private static rootFrame;
|
|
59
|
+
/**
|
|
60
|
+
* Returns where a child sits relative to its root, which is what stays true as the root moves.
|
|
61
|
+
* @param rootPos3d
|
|
62
|
+
* @param headingDegrees
|
|
63
|
+
* @param childPos3d
|
|
64
|
+
*/
|
|
65
|
+
static ChildOffsetIn(rootPos3d: Cesium.Cartesian3, headingDegrees: number, childPos3d: Cesium.Cartesian3): Cesium.Cartesian3;
|
|
66
|
+
/**
|
|
67
|
+
* Returns where a child sits in the world, for a root at this position and heading.
|
|
68
|
+
* @param rootPos3d
|
|
69
|
+
* @param headingDegrees
|
|
70
|
+
* @param offset
|
|
71
|
+
*/
|
|
72
|
+
static ChildPositionFrom(rootPos3d: Cesium.Cartesian3, headingDegrees: number, offset: Cesium.Cartesian3): Cesium.Cartesian3;
|
|
73
|
+
/**
|
|
74
|
+
* Moves the whole Assembly to a new root position, without refetching any of its children.
|
|
75
|
+
* @param params
|
|
76
|
+
*/
|
|
77
|
+
ApplyRootPosition(params: {
|
|
78
|
+
pos3d: Cesium.Cartesian3;
|
|
79
|
+
heading?: number;
|
|
80
|
+
}): void;
|
|
41
81
|
Init(): void;
|
|
42
82
|
/**
|
|
43
83
|
* Processes given entity IDs and renders them in the viewer.
|
|
@@ -45,6 +85,8 @@ export declare namespace AssemblyRenderManager {
|
|
|
45
85
|
* @returns
|
|
46
86
|
*/
|
|
47
87
|
private processEntityIds;
|
|
88
|
+
private viewerDateTimeSub;
|
|
89
|
+
private applyRootTrack;
|
|
48
90
|
Dispose(): void;
|
|
49
91
|
ReRender(params: {
|
|
50
92
|
entityIds?: string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ApiGetters, BruceEvent, Entity, MenuItem } from "bruce-models";
|
|
1
|
+
import { ApiGetters, BruceEvent, Entity, EntityCoords, EntityHistoricData, MenuItem } from "bruce-models";
|
|
2
2
|
import * as Cesium from "cesium";
|
|
3
|
+
import { CesiumAnimatedProperty } from "../../cesium-animated-property";
|
|
3
4
|
import { TilesetRenderEngine } from "../../tileset-render-engine";
|
|
4
5
|
import { VisualsRegister } from '../../visuals-register';
|
|
5
6
|
import { RenderManager } from "../render-manager";
|
|
@@ -48,9 +49,9 @@ export declare namespace TilesetCadRenderManager {
|
|
|
48
49
|
private somethingIsolatedDateTime;
|
|
49
50
|
private loadedCesiumEntities;
|
|
50
51
|
private viewerDateTimeChangeRemoval;
|
|
51
|
-
private historicPossesInitialLoaded;
|
|
52
52
|
private historicAnimation;
|
|
53
53
|
private historicGatherer;
|
|
54
|
+
private trackEntity;
|
|
54
55
|
private historicPossesLoadingProm;
|
|
55
56
|
private featureQueue;
|
|
56
57
|
private featureQueueStates;
|
|
@@ -69,6 +70,45 @@ export declare namespace TilesetCadRenderManager {
|
|
|
69
70
|
Init(): void;
|
|
70
71
|
private onCTilesetLoad;
|
|
71
72
|
get HandoffKey(): string | null;
|
|
73
|
+
private accountIdForRecords;
|
|
74
|
+
private applyRootTrack;
|
|
75
|
+
/**
|
|
76
|
+
* Returns whether this item's historic heading gets the half-turn correction.
|
|
77
|
+
* See CodeLogicExceptions.ASSEMBLY_HISTORIC_HEADING_FLIP.
|
|
78
|
+
* @param accountId whose records are being rendered
|
|
79
|
+
*/
|
|
80
|
+
static FlipsHistoricHeading(accountId: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Returns what a record's altitude means for this item, from its style's altitude option.
|
|
83
|
+
* @param item
|
|
84
|
+
*/
|
|
85
|
+
static GetRecordHeightRef(item: MenuItem.Item.ICadTileset): Cesium.HeightReference;
|
|
86
|
+
/**
|
|
87
|
+
* Turns the root Entity's historic records into the positions the tileset moves along.
|
|
88
|
+
* @param params
|
|
89
|
+
*/
|
|
90
|
+
static HistoricPossesFor(params: {
|
|
91
|
+
viewer: Cesium.Viewer;
|
|
92
|
+
item: MenuItem.Item.ICadTileset;
|
|
93
|
+
records: EntityHistoricData.IData[];
|
|
94
|
+
}): CesiumAnimatedProperty.IAnimateSeriesPos[];
|
|
95
|
+
/**
|
|
96
|
+
* Returns the tileset coordinates that place it at a root Entity's own recorded position.
|
|
97
|
+
* @param entity
|
|
98
|
+
*/
|
|
99
|
+
static CoordsFromHistoricEntity(entity: Entity.IEntity): EntityCoords.IEntityCoords;
|
|
100
|
+
/**
|
|
101
|
+
* Returns the tileset coordinates for a root at this position and attitude.
|
|
102
|
+
* @param params
|
|
103
|
+
*/
|
|
104
|
+
static CoordsFromHistoricPos3d(params: {
|
|
105
|
+
rootId: string;
|
|
106
|
+
pos3d: Cesium.Cartesian3;
|
|
107
|
+
heading: number;
|
|
108
|
+
pitch?: number;
|
|
109
|
+
roll?: number;
|
|
110
|
+
cTileset?: TilesetRenderEngine.ITilesetExt;
|
|
111
|
+
}): EntityCoords.IEntityCoords;
|
|
72
112
|
static GetHandoffKey(item: MenuItem.Item.ICadTileset, modelSpace?: boolean): string | null;
|
|
73
113
|
PrepareHandoff(): RenderManager.IHandoffPayload | null;
|
|
74
114
|
AdoptHandoff(payload: RenderManager.IHandoffPayload): void;
|
|
@@ -15,6 +15,10 @@ export declare namespace DrawingUtils {
|
|
|
15
15
|
}): {
|
|
16
16
|
point: Cesium.Cartesian3;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Empties the sampled terrain heights. For a terrain provider swap, or a test.
|
|
20
|
+
*/
|
|
21
|
+
function ClearSampledTerrain(): void;
|
|
18
22
|
/**
|
|
19
23
|
* Returns terrain height from current viewer's provider.
|
|
20
24
|
* On error or flat terrain, it will return 0.
|
|
@@ -30,6 +34,36 @@ export declare namespace DrawingUtils {
|
|
|
30
34
|
height: number;
|
|
31
35
|
error?: any;
|
|
32
36
|
}>;
|
|
37
|
+
const TERRAIN_CELL_SIZE = 400;
|
|
38
|
+
const TERRAIN_CELL_SIZE_FINE = 50;
|
|
39
|
+
const TERRAIN_CELL_MAX_SPREAD = 25;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the terrain height under a position, from the terrain as it is currently loaded.
|
|
42
|
+
*
|
|
43
|
+
* NaN when the terrain tile has not loaded yet and nothing cached covers the area, so a caller can
|
|
44
|
+
* tell "no answer" from "sea level".
|
|
45
|
+
*
|
|
46
|
+
* @param params terrainId identifies the terrain the cache is keyed against.
|
|
47
|
+
*/
|
|
48
|
+
function GetTerrainOffset(params: {
|
|
49
|
+
viewer: Cesium.Viewer;
|
|
50
|
+
pos3d: Cesium.Cartesian3;
|
|
51
|
+
terrainId: string | number | null | undefined;
|
|
52
|
+
}): number;
|
|
53
|
+
/**
|
|
54
|
+
* Returns where a position is actually drawn, as an absolute height.
|
|
55
|
+
* @param params
|
|
56
|
+
*/
|
|
57
|
+
function GetDrawnPos3d(params: {
|
|
58
|
+
viewer: Cesium.Viewer;
|
|
59
|
+
heightRef: Cesium.HeightReference;
|
|
60
|
+
pos3d: Cesium.Cartesian3;
|
|
61
|
+
terrainId: string | number | null | undefined;
|
|
62
|
+
}): Cesium.Cartesian3 | null;
|
|
63
|
+
/**
|
|
64
|
+
* Empties the terrain height cache. For a terrain provider swap, or a test.
|
|
65
|
+
*/
|
|
66
|
+
function ClearTerrainCache(): void;
|
|
33
67
|
function EnsurePosHeight(params: {
|
|
34
68
|
pos3d: Cesium.Cartesian3;
|
|
35
69
|
viewer: Cesium.Viewer;
|
|
@@ -33,6 +33,11 @@ export declare namespace ViewUtils {
|
|
|
33
33
|
}): {
|
|
34
34
|
terrain: ProjectViewTile.IBookmarkTerrain;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Returns the identity a terrain height cache should be keyed against, or null for terrain with no heights to sample.
|
|
38
|
+
* @param viewer
|
|
39
|
+
*/
|
|
40
|
+
function GetTerrainCacheId(viewer: Cesium.Viewer): string | number | null | undefined;
|
|
36
41
|
function SetTerrainWireframeStatus(params: {
|
|
37
42
|
viewer: Cesium.Viewer;
|
|
38
43
|
status: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bruce-cesium",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
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.
|
|
86
|
+
"bruce-models": "^7.1.102",
|
|
87
87
|
"tslib": "^2.4.1"
|
|
88
88
|
}
|
|
89
89
|
}
|