bruce-cesium 7.2.9 → 7.3.1
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 +512 -32
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +510 -30
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/displaced-surface-primitive.js +468 -19
- package/dist/lib/rendering/displaced-surface-primitive.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js +28 -0
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/lib/rendering/visual-register-culler.js +13 -10
- package/dist/lib/rendering/visual-register-culler.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/displaced-surface-primitive.d.ts +42 -1
- package/dist/types/rendering/entity-render-engine-polygon.d.ts +15 -0
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -6575,7 +6575,7 @@
|
|
|
6575
6575
|
const adjustedSphere = boundingSphere.sphere.clone();
|
|
6576
6576
|
// Terrain only matters here because it moves the sphere onto the ground.
|
|
6577
6577
|
// Far enough away that a plausible ground height is a rounding error against the viewing distance, sampling it is wasted work.
|
|
6578
|
-
const cameraDistance = Cesium.Cartesian3.distance(camera.
|
|
6578
|
+
const cameraDistance = Cesium.Cartesian3.distance(camera.positionWC, adjustedSphere.center);
|
|
6579
6579
|
if (cameraDistance > TERRAIN_SKIP_DISTANCE) {
|
|
6580
6580
|
adjustedSphere.radius += TERRAIN_SKIP_RADIUS_PAD;
|
|
6581
6581
|
}
|
|
@@ -6588,7 +6588,8 @@
|
|
|
6588
6588
|
}
|
|
6589
6589
|
adjustedSphere.center = grounded;
|
|
6590
6590
|
}
|
|
6591
|
-
|
|
6591
|
+
// Camera vectors are frame relative while a reference frame is set (the compass orbits via lookAt).
|
|
6592
|
+
const cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC);
|
|
6592
6593
|
const visibility = cullingVolume.computeVisibility(adjustedSphere);
|
|
6593
6594
|
return visibility !== Cesium.Intersect.INSIDE && visibility !== Cesium.Intersect.INTERSECTING;
|
|
6594
6595
|
}
|
|
@@ -6615,14 +6616,14 @@
|
|
|
6615
6616
|
return true;
|
|
6616
6617
|
}
|
|
6617
6618
|
const camera = viewer.scene.camera;
|
|
6618
|
-
if (!((_a = camera === null || camera === void 0 ? void 0 : camera.
|
|
6619
|
+
if (!((_a = camera === null || camera === void 0 ? void 0 : camera.positionWC) === null || _a === void 0 ? void 0 : _a.x)) {
|
|
6619
6620
|
return false;
|
|
6620
6621
|
}
|
|
6621
6622
|
const lastRecheck = camera[LAST_RECHECK_KEY];
|
|
6622
6623
|
if (!lastRecheck) {
|
|
6623
6624
|
camera[LAST_RECHECK_KEY] = {
|
|
6624
|
-
position: camera.
|
|
6625
|
-
direction: camera.
|
|
6625
|
+
position: camera.positionWC.clone(),
|
|
6626
|
+
direction: camera.directionWC.clone(),
|
|
6626
6627
|
tilesLoading: viewer.scene.globe.tilesLoaded
|
|
6627
6628
|
};
|
|
6628
6629
|
return true;
|
|
@@ -6631,14 +6632,14 @@
|
|
|
6631
6632
|
const tilesLoadingDiff = lastRecheck.tilesLoading != viewer.scene.globe.tilesLoaded;
|
|
6632
6633
|
let recheck = tilesLoadingDiff;
|
|
6633
6634
|
if (!recheck) {
|
|
6634
|
-
const posDiff = Cesium.Cartesian3.magnitude(Cesium.Cartesian3.subtract(position, camera.
|
|
6635
|
-
const dirDiff = Cesium.Cartesian3.magnitude(Cesium.Cartesian3.subtract(direction, camera.
|
|
6635
|
+
const posDiff = Cesium.Cartesian3.magnitude(Cesium.Cartesian3.subtract(position, camera.positionWC, new Cesium.Cartesian3()));
|
|
6636
|
+
const dirDiff = Cesium.Cartesian3.magnitude(Cesium.Cartesian3.subtract(direction, camera.directionWC, new Cesium.Cartesian3()));
|
|
6636
6637
|
recheck = posDiff > 100 || dirDiff > 0.01;
|
|
6637
6638
|
}
|
|
6638
6639
|
if (recheck) {
|
|
6639
6640
|
camera[LAST_RECHECK_KEY] = {
|
|
6640
|
-
position: camera.
|
|
6641
|
-
direction: camera.
|
|
6641
|
+
position: camera.positionWC.clone(),
|
|
6642
|
+
direction: camera.directionWC.clone(),
|
|
6642
6643
|
tilesLoading: viewer.scene.globe.tilesLoaded
|
|
6643
6644
|
};
|
|
6644
6645
|
}
|
|
@@ -6691,7 +6692,9 @@
|
|
|
6691
6692
|
return;
|
|
6692
6693
|
}
|
|
6693
6694
|
const camera = viewer.scene.camera;
|
|
6694
|
-
|
|
6695
|
+
// Camera vectors are frame relative while a reference frame is set (the compass orbits via lookAt).
|
|
6696
|
+
// These spheres are world space, so only the world coordinate vectors compare against them correctly.
|
|
6697
|
+
const cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC);
|
|
6695
6698
|
let changed = false;
|
|
6696
6699
|
for (const rego of tilesets) {
|
|
6697
6700
|
const tileset = rego.tileset;
|
|
@@ -42366,6 +42369,17 @@
|
|
|
42366
42369
|
// Most-detailed would fetch every tile under a parcel that can be a hundred kilometres across.
|
|
42367
42370
|
const GROUND_SAMPLE_LEVEL = 11;
|
|
42368
42371
|
// Height window the packed ground texture covers, wide enough for any terrain on Earth.
|
|
42372
|
+
// Ground samples across the clearance regions rather than the whole extent.
|
|
42373
|
+
const MASK_GROUND_SAMPLES_PER_SIDE = 128;
|
|
42374
|
+
// Finest and coarsest terrain level a clearance raster is sampled at, and how many terrain tiles it is allowed to pull.
|
|
42375
|
+
const MASK_GROUND_LEVEL_MAX = 13;
|
|
42376
|
+
const MASK_GROUND_LEVEL_MIN = 8;
|
|
42377
|
+
const MASK_GROUND_TILE_BUDGET = 64;
|
|
42378
|
+
// Longest side of the rasterised region mask. The mask decides whether a texel is held up, so it
|
|
42379
|
+
// wants to be finer than the value raster it is compared against.
|
|
42380
|
+
const MASK_TEXTURE_MAX_SIDE = 1024;
|
|
42381
|
+
// Stands in for "no floor" and "no clearance", far below anything the sheet can reach.
|
|
42382
|
+
const NO_LIMIT_METRES = -1e6;
|
|
42369
42383
|
const GROUND_MIN_METRES = -1000;
|
|
42370
42384
|
const GROUND_MAX_METRES = 9000;
|
|
42371
42385
|
const DEFAULT_LOW_COLOR = { red: 255, green: 255, blue: 255, alpha: 0.12 };
|
|
@@ -42388,6 +42402,19 @@ uniform float u_skirtDepth;
|
|
|
42388
42402
|
uniform float u_groundWeight;
|
|
42389
42403
|
uniform vec2 u_groundRange;
|
|
42390
42404
|
uniform vec2 u_groundSize;
|
|
42405
|
+
uniform sampler2D u_maskTexture;
|
|
42406
|
+
uniform sampler2D u_maskGroundTexture;
|
|
42407
|
+
uniform float u_maskWeight;
|
|
42408
|
+
uniform float u_maskGroundWeight;
|
|
42409
|
+
uniform float u_maskFill;
|
|
42410
|
+
uniform float u_maskFillValue;
|
|
42411
|
+
uniform float u_maskClearance;
|
|
42412
|
+
uniform float u_maskFloor;
|
|
42413
|
+
uniform vec2 u_maskGroundSize;
|
|
42414
|
+
// West, East, North, South in degrees, for the surface and for the sampled region box.
|
|
42415
|
+
uniform vec4 u_extentDegrees;
|
|
42416
|
+
uniform vec4 u_maskGroundDegrees;
|
|
42417
|
+
uniform float u_coverageCutoffVertex;
|
|
42391
42418
|
|
|
42392
42419
|
out vec2 v_st;
|
|
42393
42420
|
out float v_value;
|
|
@@ -42417,6 +42444,46 @@ float sampleGround(vec2 uv) {
|
|
|
42417
42444
|
return mix(mix(h00, h10, f.x), mix(h01, h11, f.x), f.y);
|
|
42418
42445
|
}
|
|
42419
42446
|
|
|
42447
|
+
/*
|
|
42448
|
+
* Height of the terrain under a point of the surface, read from the region's own ground raster.
|
|
42449
|
+
*
|
|
42450
|
+
* Sampled over the regions rather than over the whole extent, so the raster is fine enough for a
|
|
42451
|
+
* clearance test to mean something.
|
|
42452
|
+
*/
|
|
42453
|
+
float sampleMaskGround(vec2 uv) {
|
|
42454
|
+
float longitude = mix(u_extentDegrees.x, u_extentDegrees.y, uv.x);
|
|
42455
|
+
float latitude = mix(u_extentDegrees.z, u_extentDegrees.w, uv.y);
|
|
42456
|
+
vec2 inBox = vec2(
|
|
42457
|
+
(longitude - u_maskGroundDegrees.x) / max(u_maskGroundDegrees.y - u_maskGroundDegrees.x, 1e-9),
|
|
42458
|
+
(u_maskGroundDegrees.z - latitude) / max(u_maskGroundDegrees.z - u_maskGroundDegrees.w, 1e-9));
|
|
42459
|
+
vec2 clamped = clamp(inBox, vec2(0.0), vec2(1.0));
|
|
42460
|
+
vec2 texel = 1.0 / u_maskGroundSize;
|
|
42461
|
+
vec2 coord = clamped * u_maskGroundSize - 0.5;
|
|
42462
|
+
vec2 base = floor(coord);
|
|
42463
|
+
vec2 f = coord - base;
|
|
42464
|
+
vec2 origin = (base + 0.5) * texel;
|
|
42465
|
+
vec4 t00 = texture(u_maskGroundTexture, origin);
|
|
42466
|
+
vec4 t10 = texture(u_maskGroundTexture, origin + vec2(texel.x, 0.0));
|
|
42467
|
+
vec4 t01 = texture(u_maskGroundTexture, origin + vec2(0.0, texel.y));
|
|
42468
|
+
vec4 t11 = texture(u_maskGroundTexture, origin + texel);
|
|
42469
|
+
// One unknown corner makes the interpolation meaningless, so the whole point is treated as
|
|
42470
|
+
// unsampled and answers low enough that no clearance built on it can win.
|
|
42471
|
+
float known = min(min(t00.a, t10.a), min(t01.a, t11.a));
|
|
42472
|
+
if (known < 0.5) {
|
|
42473
|
+
return u_groundRange.x;
|
|
42474
|
+
}
|
|
42475
|
+
vec3 p00 = t00.rgb * 255.0;
|
|
42476
|
+
vec3 p10 = t10.rgb * 255.0;
|
|
42477
|
+
vec3 p01 = t01.rgb * 255.0;
|
|
42478
|
+
vec3 p11 = t11.rgb * 255.0;
|
|
42479
|
+
vec3 weights = vec3(65536.0, 256.0, 1.0);
|
|
42480
|
+
float h00 = u_groundRange.x + dot(p00, weights) / 16777215.0 * (u_groundRange.y - u_groundRange.x);
|
|
42481
|
+
float h10 = u_groundRange.x + dot(p10, weights) / 16777215.0 * (u_groundRange.y - u_groundRange.x);
|
|
42482
|
+
float h01 = u_groundRange.x + dot(p01, weights) / 16777215.0 * (u_groundRange.y - u_groundRange.x);
|
|
42483
|
+
float h11 = u_groundRange.x + dot(p11, weights) / 16777215.0 * (u_groundRange.y - u_groundRange.x);
|
|
42484
|
+
return mix(mix(h00, h10, f.x), mix(h01, h11, f.x), f.y);
|
|
42485
|
+
}
|
|
42486
|
+
|
|
42420
42487
|
/*
|
|
42421
42488
|
* The texel's normalised value, whichever way the archive packed it.
|
|
42422
42489
|
*
|
|
@@ -42436,8 +42503,16 @@ float decodeValue(vec4 texel) {
|
|
|
42436
42503
|
void main() {
|
|
42437
42504
|
vec4 texel = texture(u_valueTexture, st);
|
|
42438
42505
|
v_st = st;
|
|
42439
|
-
|
|
42440
|
-
|
|
42506
|
+
|
|
42507
|
+
// Inside a region the scene knows is water, a texel with no value still has to paint, or the
|
|
42508
|
+
// hole the region exists to close is still a hole.
|
|
42509
|
+
// The value it paints is the shallowest the ramp is not transparent at.
|
|
42510
|
+
float inMask = u_maskWeight * texture(u_maskTexture, st).a;
|
|
42511
|
+
float hasData = step(u_coverageCutoffVertex, texel.a);
|
|
42512
|
+
float raw = decodeValue(texel);
|
|
42513
|
+
float filled = mix(u_maskFillValue, max(raw, u_maskFillValue), hasData);
|
|
42514
|
+
v_value = mix(raw, filled, inMask * u_maskFill);
|
|
42515
|
+
v_coverage = max(texel.a, inMask * u_maskFill);
|
|
42441
42516
|
|
|
42442
42517
|
// Exaggeration stretches the span above the archive's minimum rather than the height itself. On an
|
|
42443
42518
|
// elevation the height is measured from the ellipsoid, tens of metres from any of the data, so
|
|
@@ -42450,8 +42525,14 @@ void main() {
|
|
|
42450
42525
|
|
|
42451
42526
|
// Coverage scales the displacement only where it is measured from the terrain, because there a
|
|
42452
42527
|
// zero means the surface sits on the ground.
|
|
42453
|
-
float coverageScale = mix(1.0,
|
|
42454
|
-
float
|
|
42528
|
+
float coverageScale = mix(1.0, v_coverage, u_groundWeight);
|
|
42529
|
+
float placed = u_baseHeight + ground + metres * coverageScale;
|
|
42530
|
+
|
|
42531
|
+
// Held above whichever is higher, the region's own floor or the terrain under it plus a margin.
|
|
42532
|
+
// Only inside the region: lifting the whole sheet would raise it over dry land as well.
|
|
42533
|
+
float held = max(u_maskFloor, sampleMaskGround(st) * u_maskGroundWeight + u_maskClearance);
|
|
42534
|
+
float lifted = mix(placed, max(placed, held), step(0.5, inMask));
|
|
42535
|
+
float displacement = lifted - skirt * u_skirtDepth;
|
|
42455
42536
|
|
|
42456
42537
|
// Added to the LOW half of the encoded position: a metre-scale offset added to the high half
|
|
42457
42538
|
// would be lost to float32 rounding at an earth radius.
|
|
@@ -42686,6 +42767,147 @@ void main() {
|
|
|
42686
42767
|
Cesium.GeometryPipeline.encodeAttribute(geometry, "position", "position3DHigh", "position3DLow");
|
|
42687
42768
|
return geometry;
|
|
42688
42769
|
}
|
|
42770
|
+
/*
|
|
42771
|
+
* Where the ramp first paints something, as a normalised value.
|
|
42772
|
+
*
|
|
42773
|
+
* A style with a hidden floor is transparent over its lowest band, so filling a gap at zero would
|
|
42774
|
+
* fill it with nothing. This is the lowest value that actually shows.
|
|
42775
|
+
*/
|
|
42776
|
+
function firstOpaqueStop(ramp) {
|
|
42777
|
+
const stops = ramp.length / 4;
|
|
42778
|
+
for (let i = 0; i < stops; i++) {
|
|
42779
|
+
if (ramp[i * 4 + 3] > 0) {
|
|
42780
|
+
return stops > 1 ? i / (stops - 1) : 0;
|
|
42781
|
+
}
|
|
42782
|
+
}
|
|
42783
|
+
return 0;
|
|
42784
|
+
}
|
|
42785
|
+
/*
|
|
42786
|
+
* Rasterises the clearance regions into a mask over the surface's extent, alpha inside.
|
|
42787
|
+
*
|
|
42788
|
+
* Drawn north row first, matching the value raster's own row order, so one set of texture
|
|
42789
|
+
* coordinates indexes both.
|
|
42790
|
+
*/
|
|
42791
|
+
function rasteriseMask(extent, regions) {
|
|
42792
|
+
const spanX = extent.East - extent.West;
|
|
42793
|
+
const spanY = extent.North - extent.South;
|
|
42794
|
+
if (!(spanX > 0) || !(spanY > 0) || !regions.length) {
|
|
42795
|
+
return null;
|
|
42796
|
+
}
|
|
42797
|
+
// No document at all off the page, and the regions are still worth holding: the mask can be
|
|
42798
|
+
// rasterised the next time they are set, and until then the surface simply lifts nothing.
|
|
42799
|
+
if (typeof document === "undefined") {
|
|
42800
|
+
return null;
|
|
42801
|
+
}
|
|
42802
|
+
const wide = spanX >= spanY;
|
|
42803
|
+
const width = wide ? MASK_TEXTURE_MAX_SIDE : Math.max(1, Math.round(MASK_TEXTURE_MAX_SIDE * spanX / spanY));
|
|
42804
|
+
const height = wide ? Math.max(1, Math.round(MASK_TEXTURE_MAX_SIDE * spanY / spanX)) : MASK_TEXTURE_MAX_SIDE;
|
|
42805
|
+
const canvas = document.createElement("canvas");
|
|
42806
|
+
canvas.width = width;
|
|
42807
|
+
canvas.height = height;
|
|
42808
|
+
const ctx = canvas.getContext("2d", { willReadFrequently: true });
|
|
42809
|
+
if (!ctx) {
|
|
42810
|
+
return null;
|
|
42811
|
+
}
|
|
42812
|
+
ctx.clearRect(0, 0, width, height);
|
|
42813
|
+
ctx.fillStyle = "#ffffff";
|
|
42814
|
+
for (const region of regions) {
|
|
42815
|
+
const rings = region.rings || [];
|
|
42816
|
+
if (!rings.length) {
|
|
42817
|
+
continue;
|
|
42818
|
+
}
|
|
42819
|
+
ctx.beginPath();
|
|
42820
|
+
for (const ring of rings) {
|
|
42821
|
+
for (let i = 0; i + 1 < ring.length; i += 2) {
|
|
42822
|
+
const x = (ring[i] - extent.West) / spanX * width;
|
|
42823
|
+
const y = (extent.North - ring[i + 1]) / spanY * height;
|
|
42824
|
+
if (i === 0) {
|
|
42825
|
+
ctx.moveTo(x, y);
|
|
42826
|
+
}
|
|
42827
|
+
else {
|
|
42828
|
+
ctx.lineTo(x, y);
|
|
42829
|
+
}
|
|
42830
|
+
}
|
|
42831
|
+
ctx.closePath();
|
|
42832
|
+
}
|
|
42833
|
+
// Even odd, so a ring inside a ring is a hole without the caller having to wind them.
|
|
42834
|
+
ctx.fill("evenodd");
|
|
42835
|
+
}
|
|
42836
|
+
return { width, height, data: new Uint8Array(ctx.getImageData(0, 0, width, height).data.buffer.slice(0)) };
|
|
42837
|
+
}
|
|
42838
|
+
/*
|
|
42839
|
+
* The box every region fits inside, clipped to the surface, so the ground under them can be
|
|
42840
|
+
* sampled without sampling the whole extent.
|
|
42841
|
+
*/
|
|
42842
|
+
function boxOf(extent, regions) {
|
|
42843
|
+
let west = Infinity;
|
|
42844
|
+
let east = -Infinity;
|
|
42845
|
+
let south = Infinity;
|
|
42846
|
+
let north = -Infinity;
|
|
42847
|
+
for (const region of regions) {
|
|
42848
|
+
for (const ring of region.rings || []) {
|
|
42849
|
+
for (let i = 0; i + 1 < ring.length; i += 2) {
|
|
42850
|
+
west = Math.min(west, ring[i]);
|
|
42851
|
+
east = Math.max(east, ring[i]);
|
|
42852
|
+
south = Math.min(south, ring[i + 1]);
|
|
42853
|
+
north = Math.max(north, ring[i + 1]);
|
|
42854
|
+
}
|
|
42855
|
+
}
|
|
42856
|
+
}
|
|
42857
|
+
if (!isFinite(west) || !isFinite(south)) {
|
|
42858
|
+
return null;
|
|
42859
|
+
}
|
|
42860
|
+
return {
|
|
42861
|
+
West: Math.max(west, extent.West),
|
|
42862
|
+
East: Math.min(east, extent.East),
|
|
42863
|
+
South: Math.max(south, extent.South),
|
|
42864
|
+
North: Math.min(north, extent.North)
|
|
42865
|
+
};
|
|
42866
|
+
}
|
|
42867
|
+
/*
|
|
42868
|
+
* Packs sampled terrain heights into a texture's RGB, three bytes a height.
|
|
42869
|
+
*
|
|
42870
|
+
* A height needs more than eight bits to be useful and the surface reads it in the vertex shader,
|
|
42871
|
+
* where float textures are not guaranteed, so it goes in as a fixed point integer.
|
|
42872
|
+
*/
|
|
42873
|
+
function packHeights(sampled) {
|
|
42874
|
+
const pixels = new Uint8Array(sampled.length * 4);
|
|
42875
|
+
const span = GROUND_MAX_METRES - GROUND_MIN_METRES;
|
|
42876
|
+
for (let i = 0; i < sampled.length; i++) {
|
|
42877
|
+
const height = sampled[i] ? sampled[i].height : undefined;
|
|
42878
|
+
const known = typeof height === "number" && isFinite(height);
|
|
42879
|
+
const clamped = Math.min(GROUND_MAX_METRES, Math.max(GROUND_MIN_METRES, known ? height : 0));
|
|
42880
|
+
const packed = Math.round(((clamped - GROUND_MIN_METRES) / span) * 16777215);
|
|
42881
|
+
pixels[i * 4] = (packed >> 16) & 255;
|
|
42882
|
+
pixels[i * 4 + 1] = (packed >> 8) & 255;
|
|
42883
|
+
pixels[i * 4 + 2] = packed & 255;
|
|
42884
|
+
pixels[i * 4 + 3] = known ? 255 : 0;
|
|
42885
|
+
}
|
|
42886
|
+
return pixels;
|
|
42887
|
+
}
|
|
42888
|
+
/*
|
|
42889
|
+
* The finest terrain level a box can be sampled at inside the tile budget.
|
|
42890
|
+
*
|
|
42891
|
+
* Asked of the provider's own tiling scheme where it offers one, since a terrain set is free to
|
|
42892
|
+
* tile the world differently from the default two by one.
|
|
42893
|
+
*/
|
|
42894
|
+
function groundLevelFor(box, provider) {
|
|
42895
|
+
const scheme = provider && provider.tilingScheme;
|
|
42896
|
+
for (let level = MASK_GROUND_LEVEL_MAX; level > MASK_GROUND_LEVEL_MIN; level--) {
|
|
42897
|
+
const across = scheme && typeof scheme.getNumberOfXTilesAtLevel === "function"
|
|
42898
|
+
? scheme.getNumberOfXTilesAtLevel(level)
|
|
42899
|
+
: Math.pow(2, level + 1);
|
|
42900
|
+
const down = scheme && typeof scheme.getNumberOfYTilesAtLevel === "function"
|
|
42901
|
+
? scheme.getNumberOfYTilesAtLevel(level)
|
|
42902
|
+
: Math.pow(2, level);
|
|
42903
|
+
const tiles = Math.ceil((box.East - box.West) / (360 / across) + 1)
|
|
42904
|
+
* Math.ceil((box.North - box.South) / (180 / down) + 1);
|
|
42905
|
+
if (tiles <= MASK_GROUND_TILE_BUDGET) {
|
|
42906
|
+
return level;
|
|
42907
|
+
}
|
|
42908
|
+
}
|
|
42909
|
+
return MASK_GROUND_LEVEL_MIN;
|
|
42910
|
+
}
|
|
42689
42911
|
class Surface {
|
|
42690
42912
|
constructor(options, hasCoverage) {
|
|
42691
42913
|
var _a, _b, _c, _d;
|
|
@@ -42704,6 +42926,14 @@ void main() {
|
|
|
42704
42926
|
this.groundTexture = null;
|
|
42705
42927
|
this.groundPixels = null;
|
|
42706
42928
|
this.groundRequested = false;
|
|
42929
|
+
this.groundClearance = null;
|
|
42930
|
+
this.maskTexture = null;
|
|
42931
|
+
this.maskPixels = null;
|
|
42932
|
+
this.maskGroundTexture = null;
|
|
42933
|
+
this.maskGroundPixels = null;
|
|
42934
|
+
this.maskGroundBox = null;
|
|
42935
|
+
this.maskGroundRequested = false;
|
|
42936
|
+
this.maskGroundLevel = 0;
|
|
42707
42937
|
this.followGround = Boolean(options.followGround);
|
|
42708
42938
|
this.terrainProvider = options.terrainProvider || null;
|
|
42709
42939
|
this.extent = options.extent;
|
|
@@ -42716,7 +42946,9 @@ void main() {
|
|
|
42716
42946
|
this.pixelPlacement = options.pixelPlacement;
|
|
42717
42947
|
this.tileSkirts = Boolean(options.tileSkirts);
|
|
42718
42948
|
this.rampPixels = RampLookup(options.rampStops || null, options.lowColor || DEFAULT_LOW_COLOR, options.highColor || DEFAULT_HIGH_COLOR);
|
|
42949
|
+
this.maskFillValue = firstOpaqueStop(this.rampPixels);
|
|
42719
42950
|
this.tiles = buildTiles(hasCoverage);
|
|
42951
|
+
this.SetGroundClearance(options.groundClearance || null);
|
|
42720
42952
|
}
|
|
42721
42953
|
GetFollowsGround() {
|
|
42722
42954
|
return this.followGround;
|
|
@@ -42739,6 +42971,97 @@ void main() {
|
|
|
42739
42971
|
SetBaseHeight(baseHeight) {
|
|
42740
42972
|
this.baseHeight = baseHeight;
|
|
42741
42973
|
}
|
|
42974
|
+
GetGroundClearance() {
|
|
42975
|
+
return this.groundClearance;
|
|
42976
|
+
}
|
|
42977
|
+
/*
|
|
42978
|
+
* The terrain level the clearance regions were sampled at, once they have been.
|
|
42979
|
+
*
|
|
42980
|
+
* Worth reading rather than assuming: the level is chosen from how big the regions are, so a
|
|
42981
|
+
* region covering a whole sound gets a coarser test than a hand drawn harbour does.
|
|
42982
|
+
*/
|
|
42983
|
+
GetGroundClearanceLevel() {
|
|
42984
|
+
return this.maskGroundLevel;
|
|
42985
|
+
}
|
|
42986
|
+
/*
|
|
42987
|
+
* What the clearance regions were measured against, once they have been.
|
|
42988
|
+
* The heights are read out of whatever the terrain stores, and a terrain referenced to sea
|
|
42989
|
+
* level reads a geoid apart from an archive delivering ellipsoidal metres.
|
|
42990
|
+
*/
|
|
42991
|
+
GetGroundClearanceStats() {
|
|
42992
|
+
if (!this.maskGroundPixels) {
|
|
42993
|
+
return null;
|
|
42994
|
+
}
|
|
42995
|
+
const span = GROUND_MAX_METRES - GROUND_MIN_METRES;
|
|
42996
|
+
let min = Infinity;
|
|
42997
|
+
let max = -Infinity;
|
|
42998
|
+
let samples = 0;
|
|
42999
|
+
for (let i = 0; i < this.maskGroundPixels.length / 4; i++) {
|
|
43000
|
+
if (!this.maskGroundPixels[i * 4 + 3]) {
|
|
43001
|
+
continue;
|
|
43002
|
+
}
|
|
43003
|
+
const packed = (this.maskGroundPixels[i * 4] << 16)
|
|
43004
|
+
+ (this.maskGroundPixels[i * 4 + 1] << 8) + this.maskGroundPixels[i * 4 + 2];
|
|
43005
|
+
const height = GROUND_MIN_METRES + (packed / 16777215) * span;
|
|
43006
|
+
min = Math.min(min, height);
|
|
43007
|
+
max = Math.max(max, height);
|
|
43008
|
+
samples++;
|
|
43009
|
+
}
|
|
43010
|
+
if (!samples) {
|
|
43011
|
+
return null;
|
|
43012
|
+
}
|
|
43013
|
+
return { level: this.maskGroundLevel, min, max, samples };
|
|
43014
|
+
}
|
|
43015
|
+
/*
|
|
43016
|
+
* The real world range the texture's 0 to 1 maps onto, so a caller can compare it against what
|
|
43017
|
+
* the terrain says without having kept its own copy.
|
|
43018
|
+
*/
|
|
43019
|
+
GetValueRange() {
|
|
43020
|
+
return { min: this.valueMin, max: this.valueMax };
|
|
43021
|
+
}
|
|
43022
|
+
/*
|
|
43023
|
+
* Takes a different terrain to measure against.
|
|
43024
|
+
* The clearance raster is sampled once and cached, so a scene that swaps its terrain would
|
|
43025
|
+
* otherwise keep holding the sheet above heights read from the terrain it used to have.
|
|
43026
|
+
*/
|
|
43027
|
+
SetTerrainProvider(provider) {
|
|
43028
|
+
if (provider === this.terrainProvider) {
|
|
43029
|
+
return;
|
|
43030
|
+
}
|
|
43031
|
+
this.terrainProvider = provider;
|
|
43032
|
+
this.groundPixels = null;
|
|
43033
|
+
this.groundRequested = false;
|
|
43034
|
+
this.maskGroundPixels = null;
|
|
43035
|
+
this.maskGroundRequested = false;
|
|
43036
|
+
this.maskGroundLevel = 0;
|
|
43037
|
+
}
|
|
43038
|
+
/*
|
|
43039
|
+
* Takes a new set of clearance regions, or drops them.
|
|
43040
|
+
* The mask is rasterised here rather than on the render thread, and the ground under the
|
|
43041
|
+
* regions is re-requested, so a plugin can hand over regions the moment it has them.
|
|
43042
|
+
*/
|
|
43043
|
+
SetGroundClearance(clearance) {
|
|
43044
|
+
this.groundClearance = clearance && clearance.regions && clearance.regions.length
|
|
43045
|
+
? clearance
|
|
43046
|
+
: null;
|
|
43047
|
+
this.maskPixels = this.groundClearance
|
|
43048
|
+
? rasteriseMask(this.extent, this.groundClearance.regions)
|
|
43049
|
+
: null;
|
|
43050
|
+
if (this.maskTexture) {
|
|
43051
|
+
this.maskTexture.destroy();
|
|
43052
|
+
this.maskTexture = null;
|
|
43053
|
+
}
|
|
43054
|
+
this.maskGroundPixels = null;
|
|
43055
|
+
this.maskGroundRequested = false;
|
|
43056
|
+
this.maskGroundLevel = 0;
|
|
43057
|
+
this.maskGroundBox = this.groundClearance
|
|
43058
|
+
? boxOf(this.extent, this.groundClearance.regions)
|
|
43059
|
+
: null;
|
|
43060
|
+
if (this.maskGroundTexture) {
|
|
43061
|
+
this.maskGroundTexture.destroy();
|
|
43062
|
+
this.maskGroundTexture = null;
|
|
43063
|
+
}
|
|
43064
|
+
}
|
|
42742
43065
|
/**
|
|
42743
43066
|
* Feeds the surface from an animated frame series.
|
|
42744
43067
|
* Height and colour advance with the clock without the caller having to push each frame in.
|
|
@@ -42777,6 +43100,8 @@ void main() {
|
|
|
42777
43100
|
this.syncRampTexture(context);
|
|
42778
43101
|
this.requestGround();
|
|
42779
43102
|
this.syncGroundTexture(context);
|
|
43103
|
+
this.requestMaskGround();
|
|
43104
|
+
this.syncMaskTextures(context);
|
|
42780
43105
|
// A tile needs one mesh before it has a bounding sphere to measure against.
|
|
42781
43106
|
for (const tile of this.tiles) {
|
|
42782
43107
|
if (!tile.centre) {
|
|
@@ -42821,6 +43146,14 @@ void main() {
|
|
|
42821
43146
|
this.groundTexture.destroy();
|
|
42822
43147
|
this.groundTexture = null;
|
|
42823
43148
|
}
|
|
43149
|
+
if (this.maskTexture) {
|
|
43150
|
+
this.maskTexture.destroy();
|
|
43151
|
+
this.maskTexture = null;
|
|
43152
|
+
}
|
|
43153
|
+
if (this.maskGroundTexture) {
|
|
43154
|
+
this.maskGroundTexture.destroy();
|
|
43155
|
+
this.maskGroundTexture = null;
|
|
43156
|
+
}
|
|
42824
43157
|
return undefined;
|
|
42825
43158
|
}
|
|
42826
43159
|
/*
|
|
@@ -42853,24 +43186,123 @@ void main() {
|
|
|
42853
43186
|
if (this.destroyed || !sampled) {
|
|
42854
43187
|
return;
|
|
42855
43188
|
}
|
|
42856
|
-
|
|
42857
|
-
const span = GROUND_MAX_METRES - GROUND_MIN_METRES;
|
|
42858
|
-
for (let i = 0; i < sampled.length; i++) {
|
|
42859
|
-
const height = sampled[i] && isFinite(sampled[i].height) ? sampled[i].height : 0;
|
|
42860
|
-
const clamped = Math.min(GROUND_MAX_METRES, Math.max(GROUND_MIN_METRES, height));
|
|
42861
|
-
const packed = Math.round(((clamped - GROUND_MIN_METRES) / span) * 16777215);
|
|
42862
|
-
pixels[i * 4] = (packed >> 16) & 255;
|
|
42863
|
-
pixels[i * 4 + 1] = (packed >> 8) & 255;
|
|
42864
|
-
pixels[i * 4 + 2] = packed & 255;
|
|
42865
|
-
pixels[i * 4 + 3] = 255;
|
|
42866
|
-
}
|
|
42867
|
-
this.groundPixels = pixels;
|
|
43189
|
+
this.groundPixels = packHeights(sampled);
|
|
42868
43190
|
})
|
|
42869
43191
|
.catch(() => {
|
|
42870
43192
|
// Terrain that cannot be sampled leaves the surface on the ellipsoid, which is
|
|
42871
43193
|
// where a clamped polygon sat before this existed.
|
|
42872
43194
|
});
|
|
42873
43195
|
}
|
|
43196
|
+
/*
|
|
43197
|
+
* Samples the terrain under the clearance regions.
|
|
43198
|
+
*
|
|
43199
|
+
* Its own raster rather than the surface's, because the surface extent here is two degrees
|
|
43200
|
+
* wide and the region is a few kilometres, and a clearance test needs the finer one.
|
|
43201
|
+
*/
|
|
43202
|
+
requestMaskGround() {
|
|
43203
|
+
if (this.maskGroundRequested || !this.groundClearance || !this.maskGroundBox) {
|
|
43204
|
+
return;
|
|
43205
|
+
}
|
|
43206
|
+
if (!(this.groundClearance.clearance > NO_LIMIT_METRES / 2)) {
|
|
43207
|
+
return;
|
|
43208
|
+
}
|
|
43209
|
+
this.maskGroundRequested = true;
|
|
43210
|
+
const sampler = Cesium.sampleTerrain;
|
|
43211
|
+
if (!this.terrainProvider || typeof sampler !== "function") {
|
|
43212
|
+
return;
|
|
43213
|
+
}
|
|
43214
|
+
const box = this.maskGroundBox;
|
|
43215
|
+
const level = groundLevelFor(box, this.terrainProvider);
|
|
43216
|
+
this.maskGroundLevel = level;
|
|
43217
|
+
const total = MASK_GROUND_SAMPLES_PER_SIDE * MASK_GROUND_SAMPLES_PER_SIDE;
|
|
43218
|
+
const scheme = this.terrainProvider.tilingScheme;
|
|
43219
|
+
const asked = [];
|
|
43220
|
+
// Which slot in the raster each asked-for position belongs to, since the ones the terrain
|
|
43221
|
+
// does not cover are never asked for at all.
|
|
43222
|
+
const slots = [];
|
|
43223
|
+
for (let row = 0; row < MASK_GROUND_SAMPLES_PER_SIDE; row++) {
|
|
43224
|
+
const fy = row / (MASK_GROUND_SAMPLES_PER_SIDE - 1);
|
|
43225
|
+
const latitude = Cesium.Math.lerp(box.North, box.South, fy);
|
|
43226
|
+
for (let col = 0; col < MASK_GROUND_SAMPLES_PER_SIDE; col++) {
|
|
43227
|
+
const fx = col / (MASK_GROUND_SAMPLES_PER_SIDE - 1);
|
|
43228
|
+
const at = Cesium.Cartographic.fromDegrees(Cesium.Math.lerp(box.West, box.East, fx), latitude);
|
|
43229
|
+
// An imported terrain covers a survey area, so asking outside it answers 404 and
|
|
43230
|
+
// fills the console with failures for points that were never going to have a height.
|
|
43231
|
+
if (scheme && typeof this.terrainProvider.getTileDataAvailable === "function") {
|
|
43232
|
+
const tile = scheme.positionToTileXY(at, level);
|
|
43233
|
+
if (!tile || this.terrainProvider.getTileDataAvailable(tile.x, tile.y, level) === false) {
|
|
43234
|
+
continue;
|
|
43235
|
+
}
|
|
43236
|
+
}
|
|
43237
|
+
asked.push(at);
|
|
43238
|
+
slots.push(row * MASK_GROUND_SAMPLES_PER_SIDE + col);
|
|
43239
|
+
}
|
|
43240
|
+
}
|
|
43241
|
+
if (!asked.length) {
|
|
43242
|
+
return;
|
|
43243
|
+
}
|
|
43244
|
+
Promise.resolve(sampler(this.terrainProvider, level, asked))
|
|
43245
|
+
.then((sampled) => {
|
|
43246
|
+
if (this.destroyed || !sampled) {
|
|
43247
|
+
return;
|
|
43248
|
+
}
|
|
43249
|
+
const spread = new Array(total).fill(undefined);
|
|
43250
|
+
for (let i = 0; i < slots.length; i++) {
|
|
43251
|
+
spread[slots[i]] = sampled[i];
|
|
43252
|
+
}
|
|
43253
|
+
this.maskGroundPixels = packHeights(spread);
|
|
43254
|
+
})
|
|
43255
|
+
.catch(() => {
|
|
43256
|
+
// Unsampled terrain leaves only the region's own floor to hold the sheet up,
|
|
43257
|
+
// which is the behaviour a region with no clearance already has.
|
|
43258
|
+
});
|
|
43259
|
+
}
|
|
43260
|
+
/*
|
|
43261
|
+
* Uploads the region mask and the ground under it, with a one texel stand-in until they land
|
|
43262
|
+
* so the shader always has something bound.
|
|
43263
|
+
*/
|
|
43264
|
+
syncMaskTextures(context) {
|
|
43265
|
+
if (!this.maskTexture) {
|
|
43266
|
+
const held = this.maskPixels;
|
|
43267
|
+
this.maskTexture = new Cesium.Texture({
|
|
43268
|
+
context,
|
|
43269
|
+
pixelFormat: Cesium.PixelFormat.RGBA,
|
|
43270
|
+
source: held
|
|
43271
|
+
? { width: held.width, height: held.height, arrayBufferView: held.data }
|
|
43272
|
+
: { width: 1, height: 1, arrayBufferView: new Uint8Array([0, 0, 0, 0]) },
|
|
43273
|
+
flipY: false,
|
|
43274
|
+
sampler: new Cesium.Sampler({
|
|
43275
|
+
wrapS: Cesium.TextureWrap.CLAMP_TO_EDGE,
|
|
43276
|
+
wrapT: Cesium.TextureWrap.CLAMP_TO_EDGE
|
|
43277
|
+
})
|
|
43278
|
+
});
|
|
43279
|
+
}
|
|
43280
|
+
if (this.maskGroundTexture && (!this.maskGroundPixels
|
|
43281
|
+
|| this.maskGroundTexture.width === MASK_GROUND_SAMPLES_PER_SIDE)) {
|
|
43282
|
+
return;
|
|
43283
|
+
}
|
|
43284
|
+
if (this.maskGroundTexture) {
|
|
43285
|
+
this.maskGroundTexture.destroy();
|
|
43286
|
+
}
|
|
43287
|
+
const size = this.maskGroundPixels ? MASK_GROUND_SAMPLES_PER_SIDE : 1;
|
|
43288
|
+
this.maskGroundTexture = new Cesium.Texture({
|
|
43289
|
+
context,
|
|
43290
|
+
pixelFormat: Cesium.PixelFormat.RGBA,
|
|
43291
|
+
source: {
|
|
43292
|
+
width: size,
|
|
43293
|
+
height: size,
|
|
43294
|
+
arrayBufferView: this.maskGroundPixels || packHeights([{ height: 0 }])
|
|
43295
|
+
},
|
|
43296
|
+
flipY: false,
|
|
43297
|
+
sampler: new Cesium.Sampler({
|
|
43298
|
+
wrapS: Cesium.TextureWrap.CLAMP_TO_EDGE,
|
|
43299
|
+
wrapT: Cesium.TextureWrap.CLAMP_TO_EDGE,
|
|
43300
|
+
// Nearest, because the shader interpolates decoded heights itself.
|
|
43301
|
+
minificationFilter: Cesium.TextureMinificationFilter.NEAREST,
|
|
43302
|
+
magnificationFilter: Cesium.TextureMagnificationFilter.NEAREST
|
|
43303
|
+
})
|
|
43304
|
+
});
|
|
43305
|
+
}
|
|
42874
43306
|
/*
|
|
42875
43307
|
* Uploads whatever ground samples exist, and a flat stand-in until they arrive, so the
|
|
42876
43308
|
* shader always has a texture bound whether or not this surface follows the ground.
|
|
@@ -42882,10 +43314,8 @@ void main() {
|
|
|
42882
43314
|
if (this.groundTexture) {
|
|
42883
43315
|
this.groundTexture.destroy();
|
|
42884
43316
|
}
|
|
42885
|
-
const zero = Math.round(((0 - GROUND_MIN_METRES) / (GROUND_MAX_METRES - GROUND_MIN_METRES)) * 16777215);
|
|
42886
43317
|
const size = this.groundPixels ? GROUND_SAMPLES_PER_SIDE : 1;
|
|
42887
|
-
const arrayBufferView = this.groundPixels
|
|
42888
|
-
|| new Uint8Array([(zero >> 16) & 255, (zero >> 8) & 255, zero & 255, 255]);
|
|
43318
|
+
const arrayBufferView = this.groundPixels || packHeights([{ height: 0 }]);
|
|
42889
43319
|
this.groundTexture = new Cesium.Texture({
|
|
42890
43320
|
context,
|
|
42891
43321
|
pixelFormat: Cesium.PixelFormat.RGBA,
|
|
@@ -43094,6 +43524,28 @@ void main() {
|
|
|
43094
43524
|
u_groundWeight: () => (self.followGround && self.groundPixels ? 1 : 0),
|
|
43095
43525
|
u_groundRange: () => new Cesium.Cartesian2(GROUND_MIN_METRES, GROUND_MAX_METRES),
|
|
43096
43526
|
u_groundSize: () => new Cesium.Cartesian2(self.groundPixels ? GROUND_SAMPLES_PER_SIDE : 1, self.groundPixels ? GROUND_SAMPLES_PER_SIDE : 1),
|
|
43527
|
+
u_maskTexture: () => self.maskTexture,
|
|
43528
|
+
u_maskGroundTexture: () => self.maskGroundTexture,
|
|
43529
|
+
u_maskWeight: () => (self.groundClearance && self.maskPixels ? 1 : 0),
|
|
43530
|
+
u_maskGroundWeight: () => (self.maskGroundPixels ? 1 : 0),
|
|
43531
|
+
u_maskFill: () => (self.groundClearance && self.groundClearance.fillGaps ? 1 : 0),
|
|
43532
|
+
u_maskFillValue: () => self.maskFillValue,
|
|
43533
|
+
u_maskClearance: () => (self.groundClearance
|
|
43534
|
+
&& typeof self.groundClearance.clearance === "number"
|
|
43535
|
+
&& self.maskGroundPixels
|
|
43536
|
+
? self.groundClearance.clearance
|
|
43537
|
+
: NO_LIMIT_METRES),
|
|
43538
|
+
u_maskFloor: () => (self.groundClearance
|
|
43539
|
+
&& typeof self.groundClearance.floor === "number"
|
|
43540
|
+
? self.groundClearance.floor
|
|
43541
|
+
: NO_LIMIT_METRES),
|
|
43542
|
+
u_maskGroundSize: () => new Cesium.Cartesian2(self.maskGroundPixels ? MASK_GROUND_SAMPLES_PER_SIDE : 1, self.maskGroundPixels ? MASK_GROUND_SAMPLES_PER_SIDE : 1),
|
|
43543
|
+
u_extentDegrees: () => new Cesium.Cartesian4(self.extent.West, self.extent.East, self.extent.North, self.extent.South),
|
|
43544
|
+
u_maskGroundDegrees: () => {
|
|
43545
|
+
const box = self.maskGroundBox || self.extent;
|
|
43546
|
+
return new Cesium.Cartesian4(box.West, box.East, box.North, box.South);
|
|
43547
|
+
},
|
|
43548
|
+
u_coverageCutoffVertex: () => COVERAGE_CUTOFF,
|
|
43097
43549
|
u_metresPerTexel: () => self.metresPerTexel(),
|
|
43098
43550
|
u_valueMin: () => self.valueMin,
|
|
43099
43551
|
u_valueRange: () => self.valueMax - self.valueMin,
|
|
@@ -43729,6 +44181,34 @@ void main() {
|
|
|
43729
44181
|
return cEntities;
|
|
43730
44182
|
}
|
|
43731
44183
|
EntityRenderEnginePolygon.RenderGroup = RenderGroup;
|
|
44184
|
+
/**
|
|
44185
|
+
* The displaced surface a cEntity is drawing, if it is drawing one.
|
|
44186
|
+
*
|
|
44187
|
+
* Exposed so a background plugin can hand a rendered polygon the water regions it is supposed to
|
|
44188
|
+
* stay above without having to know where the surface is kept.
|
|
44189
|
+
* @param cEntity
|
|
44190
|
+
*/
|
|
44191
|
+
function GetDisplacedSurface(cEntity) {
|
|
44192
|
+
return (cEntity === null || cEntity === void 0 ? void 0 : cEntity[DISPLACED_SURFACE_KEY]) || null;
|
|
44193
|
+
}
|
|
44194
|
+
EntityRenderEnginePolygon.GetDisplacedSurface = GetDisplacedSurface;
|
|
44195
|
+
/**
|
|
44196
|
+
* Hands every rendered polygon in a set the regions its sheet must stay above.
|
|
44197
|
+
* @param cEntities
|
|
44198
|
+
* @param clearance Pass null to drop the regions again.
|
|
44199
|
+
*/
|
|
44200
|
+
function SetGroundClearance(cEntities, clearance) {
|
|
44201
|
+
let touched = 0;
|
|
44202
|
+
for (const cEntity of cEntities || []) {
|
|
44203
|
+
const surface = GetDisplacedSurface(cEntity);
|
|
44204
|
+
if (surface) {
|
|
44205
|
+
surface.SetGroundClearance(clearance);
|
|
44206
|
+
touched++;
|
|
44207
|
+
}
|
|
44208
|
+
}
|
|
44209
|
+
return touched;
|
|
44210
|
+
}
|
|
44211
|
+
EntityRenderEnginePolygon.SetGroundClearance = SetGroundClearance;
|
|
43732
44212
|
/**
|
|
43733
44213
|
* Disposes a cEntity's TextureFrameSeriesAnimator.Animator (if any).
|
|
43734
44214
|
*/
|
|
@@ -45776,7 +46256,7 @@ void main() {
|
|
|
45776
46256
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
45777
46257
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
45778
46258
|
|
|
45779
|
-
const VERSION = "7.
|
|
46259
|
+
const VERSION = "7.3.1";
|
|
45780
46260
|
/**
|
|
45781
46261
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
45782
46262
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|