bruce-cesium 7.7.8 → 7.8.0
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 +423 -29
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +421 -27
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label-group.js +13 -4
- package/dist/lib/rendering/render-managers/common/entity-label-group.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +35 -7
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js +3 -0
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js.map +1 -1
- package/dist/lib/viewer/camera-controls.js +370 -15
- package/dist/lib/viewer/camera-controls.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/common/entity-label-group.d.ts +1 -1
- package/dist/types/rendering/render-managers/common/entity-label.d.ts +5 -1
- package/dist/types/viewer/camera-controls.d.ts +8 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
2
|
-
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass,
|
|
3
|
-
import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1,
|
|
2
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ConstantPositionProperty, HeightReference, DistanceDisplayCondition, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, JulianDate, Quaternion, HeadingPitchRoll, ColorBlendMode, Model, ClassificationType, ArcType, CornerType, HorizontalOrigin, VerticalOrigin, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, SceneMode, IntersectionTests, Ray, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, FeatureDetection, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Intersect, OrthographicFrustum, EasingFunction, WebGLConstants, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, PrimitiveCollection, ShadowMode, PolylineCollection, LabelCollection, LabelStyle, Material, CustomDataSource, GeometryInstance, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, Event, CameraEventType, Plane, OrientedBoundingBox, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
|
|
3
|
+
import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1, Api, ProjectView, ProjectViewBookmark, ZoomControl, Assembly, EntityCoords, Bounds, ClientFileValueMap, Color as Color$1, BruceApi, EntityRelation, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, EntityAttachment, EntityAttribute, MathUtils, ProjectViewBookmarkGroup } from 'bruce-models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -926,6 +926,32 @@ const ZOOM_EASE = 0.35;
|
|
|
926
926
|
const GRAZING_SINE = 0.12;
|
|
927
927
|
// Closest the view may get to straight up or down while orbiting, in radians, so the camera never flips over.
|
|
928
928
|
const ORBIT_POLE_MARGIN = Math$1.toRadians(1);
|
|
929
|
+
// How far above the ground a camera coming down from above stops, until pushed on through.
|
|
930
|
+
const GROUND_STANDOFF = 2;
|
|
931
|
+
// Height above the ground within which a descent slows, so the ground is approached rather than hit.
|
|
932
|
+
const GROUND_APPROACH = 10;
|
|
933
|
+
// The slowest a descent gets near the ground, as a share of its usual speed.
|
|
934
|
+
const GROUND_APPROACH_FLOOR = 0.5;
|
|
935
|
+
// How far below the ground a push through it lands, so the camera is clearly under it.
|
|
936
|
+
const GROUND_BREAK_DEPTH = 1.5;
|
|
937
|
+
// Wheel notches of pushing at the ground that take the camera through it, with and without data found below it.
|
|
938
|
+
const PUSH_NOTCHES_DATA_BELOW = 3;
|
|
939
|
+
const PUSH_NOTCHES_NOTHING_BELOW = 10;
|
|
940
|
+
// Pushes further apart than this start counting again.
|
|
941
|
+
const PUSH_WINDOW_MS = 1200;
|
|
942
|
+
// How far below the ground something must reach to count as data underground, in metres.
|
|
943
|
+
const UNDERGROUND_MARGIN = 3;
|
|
944
|
+
// How long a scan of the scene for underground data and stand-in ground is trusted, in milliseconds.
|
|
945
|
+
const SCENE_SCAN_MS = 2000;
|
|
946
|
+
// The most entities one scan looks at, so a large scene is sampled rather than walked each time.
|
|
947
|
+
const SCENE_SCAN_ENTITIES = 3000;
|
|
948
|
+
// Zoom speed, as a share of the usual, toward a point that is a guess (nothing drawn there) or while terrain loads.
|
|
949
|
+
const ZOOM_GUESS_SHARE = 0.5;
|
|
950
|
+
const ZOOM_LOADING_SHARE = 0.7;
|
|
951
|
+
// The highest a camera zooms out to with the globe hidden, which CesiumJS's controller cannot navigate.
|
|
952
|
+
const HIDDEN_GLOBE_MAX_HEIGHT = 10000000;
|
|
953
|
+
// Marks a tileset that stands in for the globe, such as Google's photorealistic tiles.
|
|
954
|
+
const GROUND_TILESET_KEY = "_nextspace_camera_ground";
|
|
929
955
|
var EDrag;
|
|
930
956
|
(function (EDrag) {
|
|
931
957
|
EDrag["Pan"] = "pan";
|
|
@@ -959,6 +985,9 @@ var CameraControls;
|
|
|
959
985
|
zoomFrame: null,
|
|
960
986
|
zoomPosition: null,
|
|
961
987
|
lastDistance: 100,
|
|
988
|
+
push: { notches: 0, at: 0 },
|
|
989
|
+
scan: null,
|
|
990
|
+
undergroundOverride: null,
|
|
962
991
|
saved: {
|
|
963
992
|
rotateEventTypes: controller.rotateEventTypes,
|
|
964
993
|
zoomEventTypes: controller.zoomEventTypes,
|
|
@@ -1015,6 +1044,25 @@ var CameraControls;
|
|
|
1015
1044
|
return Boolean(viewer === null || viewer === void 0 ? void 0 : viewer[CESIUM_CAMERA_CONTROLS_KEY]);
|
|
1016
1045
|
}
|
|
1017
1046
|
CameraControls.IsAttached = IsAttached;
|
|
1047
|
+
/**
|
|
1048
|
+
* Marks a tileset as standing in for the globe (Google's photorealistic tiles), so the camera treats it as ground.
|
|
1049
|
+
*/
|
|
1050
|
+
function SetGroundTileset(tileset, isGround) {
|
|
1051
|
+
if (tileset) {
|
|
1052
|
+
tileset[GROUND_TILESET_KEY] = isGround;
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
CameraControls.SetGroundTileset = SetGroundTileset;
|
|
1056
|
+
/**
|
|
1057
|
+
* Says whether the scene has data underground, which makes the ground easier to push through; null scans for it.
|
|
1058
|
+
*/
|
|
1059
|
+
function SetUndergroundData(viewer, present) {
|
|
1060
|
+
const state = viewer === null || viewer === void 0 ? void 0 : viewer[CESIUM_CAMERA_CONTROLS_KEY];
|
|
1061
|
+
if (state) {
|
|
1062
|
+
state.undergroundOverride = present;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
CameraControls.SetUndergroundData = SetUndergroundData;
|
|
1018
1066
|
/**
|
|
1019
1067
|
* Switches to navigating model-space measured from the frame getFrame returns, or back to geospatial with null.
|
|
1020
1068
|
*/
|
|
@@ -1095,8 +1143,27 @@ function shouldControl(state) {
|
|
|
1095
1143
|
if (state.getModelSpaceFrame) {
|
|
1096
1144
|
return true;
|
|
1097
1145
|
}
|
|
1146
|
+
// CesiumJS's controller measures against the globe, so with it hidden these controls keep the camera at any height.
|
|
1147
|
+
if (!globeShown(state)) {
|
|
1148
|
+
return true;
|
|
1149
|
+
}
|
|
1098
1150
|
return heightOf(state, camera.positionWC) < GEO_HANDOFF_HEIGHT;
|
|
1099
1151
|
}
|
|
1152
|
+
function globeShown(state) {
|
|
1153
|
+
const globe = state.viewer.scene.globe;
|
|
1154
|
+
return Boolean(globe) && globe.show !== false;
|
|
1155
|
+
}
|
|
1156
|
+
/*
|
|
1157
|
+
* The terrain's height at a place from the tiles loaded, undefined with the globe hidden or nothing loaded there.
|
|
1158
|
+
*/
|
|
1159
|
+
function terrainHeightAt(state, carto) {
|
|
1160
|
+
const globe = state.viewer.scene.globe;
|
|
1161
|
+
if (!carto || !globeShown(state) || typeof globe.getHeight !== "function") {
|
|
1162
|
+
return undefined;
|
|
1163
|
+
}
|
|
1164
|
+
const height = globe.getHeight(carto);
|
|
1165
|
+
return Number.isFinite(height) ? height : undefined;
|
|
1166
|
+
}
|
|
1100
1167
|
function ellipsoidOf(state) {
|
|
1101
1168
|
var _a, _b;
|
|
1102
1169
|
return (_b = (_a = state.viewer.scene.globe) === null || _a === void 0 ? void 0 : _a.ellipsoid) !== null && _b !== void 0 ? _b : Ellipsoid.WGS84;
|
|
@@ -1123,16 +1190,19 @@ function upAt(state, position) {
|
|
|
1123
1190
|
* The level plane standing in for the ground when nothing is drawn under the cursor.
|
|
1124
1191
|
*/
|
|
1125
1192
|
function groundPlane(state) {
|
|
1193
|
+
var _a;
|
|
1126
1194
|
if (state.getModelSpaceFrame) {
|
|
1127
1195
|
const frame = state.getModelSpaceFrame();
|
|
1128
1196
|
return Plane.fromPointNormal(Matrix4.getTranslation(frame, new Cartesian3()), upAt(state, null));
|
|
1129
1197
|
}
|
|
1130
1198
|
const camera = state.viewer.camera;
|
|
1131
1199
|
const ellipsoid = ellipsoidOf(state);
|
|
1132
|
-
const
|
|
1133
|
-
if (!
|
|
1200
|
+
const carto = ellipsoid.cartesianToCartographic(camera.positionWC);
|
|
1201
|
+
if (!carto) {
|
|
1134
1202
|
return null;
|
|
1135
1203
|
}
|
|
1204
|
+
// Level with the terrain under the camera, not sea level, so a guess over high ground is not far too deep.
|
|
1205
|
+
const surface = Cartesian3.fromRadians(carto.longitude, carto.latitude, (_a = terrainHeightAt(state, carto)) !== null && _a !== void 0 ? _a : 0, ellipsoid);
|
|
1136
1206
|
return Plane.fromPointNormal(surface, ellipsoid.geodeticSurfaceNormal(surface, new Cartesian3()));
|
|
1137
1207
|
}
|
|
1138
1208
|
/*
|
|
@@ -1170,14 +1240,44 @@ function pickTarget(state, position) {
|
|
|
1170
1240
|
}
|
|
1171
1241
|
const plausible = plausibleDistance(state);
|
|
1172
1242
|
if (isAhead(camera, picked) && Cartesian3.distance(picked, camera.positionWC) < plausible) {
|
|
1173
|
-
return picked;
|
|
1243
|
+
return { point: picked, source: "pick", ground: isGroundPick(state, position) };
|
|
1174
1244
|
}
|
|
1175
1245
|
const ground = groundPlane(state);
|
|
1176
1246
|
const onGround = ground ? IntersectionTests.rayPlane(ray, ground) : null;
|
|
1177
1247
|
if (isAhead(camera, onGround) && Cartesian3.distance(onGround, camera.positionWC) < plausible) {
|
|
1178
|
-
|
|
1248
|
+
// The plane stands in for the ground only where there is ground to stand in for.
|
|
1249
|
+
return { point: onGround, source: "plane", ground: !state.getModelSpaceFrame && hasGround(state) };
|
|
1250
|
+
}
|
|
1251
|
+
return { point: Ray.getPoint(ray, state.lastDistance), source: "last", ground: false };
|
|
1252
|
+
}
|
|
1253
|
+
/*
|
|
1254
|
+
* Whether what is drawn under a screen position is the ground: the globe, or a tileset standing in for it.
|
|
1255
|
+
*/
|
|
1256
|
+
function isGroundPick(state, position) {
|
|
1257
|
+
var _a, _b, _c;
|
|
1258
|
+
if (state.getModelSpaceFrame) {
|
|
1259
|
+
return false;
|
|
1179
1260
|
}
|
|
1180
|
-
|
|
1261
|
+
const scene = state.viewer.scene;
|
|
1262
|
+
let picked;
|
|
1263
|
+
try {
|
|
1264
|
+
picked = typeof scene.pick === "function" ? scene.pick(position) : undefined;
|
|
1265
|
+
}
|
|
1266
|
+
catch (e) {
|
|
1267
|
+
picked = undefined;
|
|
1268
|
+
}
|
|
1269
|
+
if (!picked) {
|
|
1270
|
+
// Nothing pickable means the globe, when it is drawn.
|
|
1271
|
+
return globeShown(state);
|
|
1272
|
+
}
|
|
1273
|
+
const tileset = (_b = (_a = picked.tileset) !== null && _a !== void 0 ? _a : picked.primitive) !== null && _b !== void 0 ? _b : (_c = picked.content) === null || _c === void 0 ? void 0 : _c.tileset;
|
|
1274
|
+
return Boolean(tileset === null || tileset === void 0 ? void 0 : tileset[GROUND_TILESET_KEY]);
|
|
1275
|
+
}
|
|
1276
|
+
/*
|
|
1277
|
+
* Whether there is ground to come down onto: the globe drawn, or a tileset standing in for it.
|
|
1278
|
+
*/
|
|
1279
|
+
function hasGround(state) {
|
|
1280
|
+
return globeShown(state) || scanScene(state).groundTileset;
|
|
1181
1281
|
}
|
|
1182
1282
|
function isAhead(camera, point) {
|
|
1183
1283
|
if (!point || !Number.isFinite(point.x) || !Number.isFinite(point.y) || !Number.isFinite(point.z)) {
|
|
@@ -1238,14 +1338,15 @@ function onPointerDown(state, e) {
|
|
|
1238
1338
|
return;
|
|
1239
1339
|
}
|
|
1240
1340
|
const position = canvasPosition(viewer, e);
|
|
1241
|
-
const
|
|
1242
|
-
if (!
|
|
1341
|
+
const picked = pickTarget(state, position);
|
|
1342
|
+
if (!picked) {
|
|
1243
1343
|
return;
|
|
1244
1344
|
}
|
|
1345
|
+
const target = picked.point;
|
|
1245
1346
|
const camera = viewer.camera;
|
|
1246
1347
|
const distance = Cartesian3.distance(camera.positionWC, target);
|
|
1247
1348
|
state.lastDistance = Math.max(distance, MIN_ZOOM_DISTANCE);
|
|
1248
|
-
const drag = { kind, pointerId: e.pointerId, last: position, target, up: upAt(state, target), distance };
|
|
1349
|
+
const drag = { kind, pointerId: e.pointerId, last: position, target, up: upAt(state, target), distance, picked };
|
|
1249
1350
|
if (kind === EDrag.Pan) {
|
|
1250
1351
|
drag.plane = panPlane(camera, target, drag.up);
|
|
1251
1352
|
}
|
|
@@ -1288,7 +1389,7 @@ function onPointerMove(state, e) {
|
|
|
1288
1389
|
break;
|
|
1289
1390
|
case EDrag.Zoom:
|
|
1290
1391
|
// Dragging down zooms in, as it does in CesiumJS.
|
|
1291
|
-
moveAlong(state, drag.direction, drag.
|
|
1392
|
+
moveAlong(state, drag.direction, drag.picked, dy / DRAG_PIXELS_PER_NOTCH);
|
|
1292
1393
|
break;
|
|
1293
1394
|
}
|
|
1294
1395
|
drag.last = position;
|
|
@@ -1321,6 +1422,14 @@ function pan(state, drag, position) {
|
|
|
1321
1422
|
if (length > limit) {
|
|
1322
1423
|
Cartesian3.multiplyByScalar(delta, limit / length, delta);
|
|
1323
1424
|
}
|
|
1425
|
+
// A pan never takes a camera above the ground down through it; it keeps the sideways part of the move.
|
|
1426
|
+
if (wouldSinkBelowGround(state, camera.position, delta)) {
|
|
1427
|
+
const up = upAt(state, camera.position);
|
|
1428
|
+
const down = Cartesian3.dot(delta, up);
|
|
1429
|
+
if (down < 0) {
|
|
1430
|
+
Cartesian3.subtract(delta, Cartesian3.multiplyByScalar(up, down, new Cartesian3()), delta);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1324
1433
|
Cartesian3.add(camera.position, delta, camera.position);
|
|
1325
1434
|
}
|
|
1326
1435
|
/*
|
|
@@ -1342,7 +1451,13 @@ function orbit(state, drag, dx, dy) {
|
|
|
1342
1451
|
const right = Cartesian3.cross(camera.direction, up, new Cartesian3());
|
|
1343
1452
|
if (Cartesian3.magnitude(right) > Math$1.EPSILON6) {
|
|
1344
1453
|
Cartesian3.normalize(right, right);
|
|
1454
|
+
const before = Cartesian3.clone(camera.position);
|
|
1345
1455
|
rotateAbout(camera, drag.target, right, pitch);
|
|
1456
|
+
// Orbiting does not swing a camera above the ground down through it; the tilt that would is undone.
|
|
1457
|
+
const moved = Cartesian3.subtract(camera.position, before, new Cartesian3());
|
|
1458
|
+
if (wouldSinkBelowGround(state, before, moved)) {
|
|
1459
|
+
rotateAbout(camera, drag.target, right, -pitch);
|
|
1460
|
+
}
|
|
1346
1461
|
}
|
|
1347
1462
|
levelCamera(camera, upAt(state, camera.position));
|
|
1348
1463
|
}
|
|
@@ -1429,22 +1544,262 @@ function moveAlong(state, direction, target, notches) {
|
|
|
1429
1544
|
/*
|
|
1430
1545
|
* The move for some notches toward a target along a direction, a share of the distance with a floor so it never stalls.
|
|
1431
1546
|
*/
|
|
1432
|
-
function zoomStep(state, direction,
|
|
1547
|
+
function zoomStep(state, direction, picked, notches) {
|
|
1433
1548
|
const camera = state.viewer.camera;
|
|
1434
|
-
const
|
|
1549
|
+
const target = picked.point;
|
|
1550
|
+
// Where the camera will be once the glide already under way ends, which this step continues from.
|
|
1551
|
+
const from = Cartesian3.add(camera.positionWC, state.pendingZoom, new Cartesian3());
|
|
1552
|
+
const distance = Math.max(Cartesian3.distance(from, target), MIN_ZOOM_DISTANCE);
|
|
1435
1553
|
state.lastDistance = distance;
|
|
1436
|
-
let length = distance * ZOOM_SHARE * notches;
|
|
1554
|
+
let length = distance * ZOOM_SHARE * notches * zoomSpeedShare(state, picked);
|
|
1437
1555
|
// A geospatial camera zooming out hands over to CesiumJS once it is high enough, so only model-space is capped.
|
|
1438
1556
|
if (length < 0 && state.getModelSpaceFrame) {
|
|
1439
1557
|
const origin = Matrix4.getTranslation(state.getModelSpaceFrame(), new Cartesian3());
|
|
1440
|
-
const
|
|
1441
|
-
const range = Cartesian3.distance(pending, origin);
|
|
1558
|
+
const range = Cartesian3.distance(from, origin);
|
|
1442
1559
|
length = Math.max(length, range - MODEL_SPACE_MAX_RANGE);
|
|
1443
1560
|
if (length >= 0) {
|
|
1444
1561
|
return new Cartesian3();
|
|
1445
1562
|
}
|
|
1446
1563
|
}
|
|
1447
|
-
|
|
1564
|
+
const unit = Cartesian3.normalize(direction, new Cartesian3());
|
|
1565
|
+
// With the globe hidden there is no hand-over, so zooming out stops where the Earth is a dot.
|
|
1566
|
+
if (length < 0 && !state.getModelSpaceFrame && !globeShown(state)) {
|
|
1567
|
+
const rise = -Cartesian3.dot(unit, upAt(state, from));
|
|
1568
|
+
const headroom = HIDDEN_GLOBE_MAX_HEIGHT - heightOf(state, from);
|
|
1569
|
+
if (rise > 0) {
|
|
1570
|
+
length = Math.max(length, -Math.max(headroom, 0) / rise);
|
|
1571
|
+
}
|
|
1572
|
+
if (length >= 0) {
|
|
1573
|
+
return new Cartesian3();
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
const step = Cartesian3.multiplyByScalar(unit, length, new Cartesian3());
|
|
1577
|
+
return length > 0 ? resistDescent(state, from, step, picked, notches) : step;
|
|
1578
|
+
}
|
|
1579
|
+
/*
|
|
1580
|
+
* How fast to zoom toward a target: slower toward a guess, or while the terrain that would give a real one loads.
|
|
1581
|
+
*/
|
|
1582
|
+
function zoomSpeedShare(state, picked) {
|
|
1583
|
+
let share = 1;
|
|
1584
|
+
if (picked.source !== "pick") {
|
|
1585
|
+
share *= ZOOM_GUESS_SHARE;
|
|
1586
|
+
}
|
|
1587
|
+
const globe = state.viewer.scene.globe;
|
|
1588
|
+
if (!state.getModelSpaceFrame && globeShown(state) && globe.tilesLoaded === false) {
|
|
1589
|
+
share *= ZOOM_LOADING_SHARE;
|
|
1590
|
+
}
|
|
1591
|
+
return share;
|
|
1592
|
+
}
|
|
1593
|
+
/*
|
|
1594
|
+
* The ground a move comes down onto: the ground picked, else the terrain under where the move ends; null for none.
|
|
1595
|
+
*/
|
|
1596
|
+
function groundUnderMove(state, from, step, picked) {
|
|
1597
|
+
var _a, _b;
|
|
1598
|
+
if (state.getModelSpaceFrame || !hasGround(state)) {
|
|
1599
|
+
return null;
|
|
1600
|
+
}
|
|
1601
|
+
if (picked === null || picked === void 0 ? void 0 : picked.ground) {
|
|
1602
|
+
return { point: picked.point, up: upAt(state, picked.point) };
|
|
1603
|
+
}
|
|
1604
|
+
if (!globeShown(state)) {
|
|
1605
|
+
return null;
|
|
1606
|
+
}
|
|
1607
|
+
const ellipsoid = ellipsoidOf(state);
|
|
1608
|
+
const end = Cartesian3.add(from, step, new Cartesian3());
|
|
1609
|
+
const carto = ellipsoid.cartesianToCartographic(end);
|
|
1610
|
+
if (!carto) {
|
|
1611
|
+
return null;
|
|
1612
|
+
}
|
|
1613
|
+
const height = (_b = (_a = terrainHeightAt(state, carto)) !== null && _a !== void 0 ? _a : terrainHeightAt(state, ellipsoid.cartesianToCartographic(from))) !== null && _b !== void 0 ? _b : 0;
|
|
1614
|
+
const point = Cartesian3.fromRadians(carto.longitude, carto.latitude, height, ellipsoid);
|
|
1615
|
+
return { point, up: ellipsoid.geodeticSurfaceNormal(point, new Cartesian3()) };
|
|
1616
|
+
}
|
|
1617
|
+
/*
|
|
1618
|
+
* Whether a move takes a camera that is above the ground to within the stand-off of it or below.
|
|
1619
|
+
*/
|
|
1620
|
+
function wouldSinkBelowGround(state, from, step) {
|
|
1621
|
+
const ground = groundUnderMove(state, from, step, null);
|
|
1622
|
+
if (!ground) {
|
|
1623
|
+
return false;
|
|
1624
|
+
}
|
|
1625
|
+
const before = Cartesian3.dot(Cartesian3.subtract(from, ground.point, new Cartesian3()), ground.up);
|
|
1626
|
+
const after = before + Cartesian3.dot(step, ground.up);
|
|
1627
|
+
return before > 0 && after < Math.min(GROUND_STANDOFF, before);
|
|
1628
|
+
}
|
|
1629
|
+
/*
|
|
1630
|
+
* Slows a camera coming down from above as it nears the ground and stops it just above, until pushed on enough to
|
|
1631
|
+
* pass through; harder when nothing is known to be underground. A camera already below the ground moves freely.
|
|
1632
|
+
*/
|
|
1633
|
+
function resistDescent(state, from, step, picked, notches) {
|
|
1634
|
+
const ground = groundUnderMove(state, from, step, picked);
|
|
1635
|
+
const length = Cartesian3.magnitude(step);
|
|
1636
|
+
if (!ground || length === 0) {
|
|
1637
|
+
return step;
|
|
1638
|
+
}
|
|
1639
|
+
const above = Cartesian3.dot(Cartesian3.subtract(from, ground.point, new Cartesian3()), ground.up);
|
|
1640
|
+
const unit = Cartesian3.divideByScalar(step, length, new Cartesian3());
|
|
1641
|
+
const sink = -Cartesian3.dot(unit, ground.up);
|
|
1642
|
+
if (above <= 0 || sink <= 0) {
|
|
1643
|
+
return step;
|
|
1644
|
+
}
|
|
1645
|
+
let allowed = length;
|
|
1646
|
+
if (above < GROUND_APPROACH) {
|
|
1647
|
+
allowed *= Math.max(above / GROUND_APPROACH, GROUND_APPROACH_FLOOR);
|
|
1648
|
+
}
|
|
1649
|
+
const toStandOff = Math.max(above - GROUND_STANDOFF, 0) / sink;
|
|
1650
|
+
if (allowed <= toStandOff) {
|
|
1651
|
+
return Cartesian3.multiplyByScalar(unit, allowed, new Cartesian3());
|
|
1652
|
+
}
|
|
1653
|
+
// Held at the stand-off: each push counts, and enough close together go through.
|
|
1654
|
+
const now = Date.now();
|
|
1655
|
+
if (now - state.push.at > PUSH_WINDOW_MS) {
|
|
1656
|
+
state.push.notches = 0;
|
|
1657
|
+
}
|
|
1658
|
+
state.push.at = now;
|
|
1659
|
+
state.push.notches += Math.abs(notches);
|
|
1660
|
+
const needed = scanScene(state).undergroundData ? PUSH_NOTCHES_DATA_BELOW : PUSH_NOTCHES_NOTHING_BELOW;
|
|
1661
|
+
if (state.push.notches >= needed) {
|
|
1662
|
+
state.push.notches = 0;
|
|
1663
|
+
// A shallow push would land far along the ground to get under it, so it goes no further than a usual step.
|
|
1664
|
+
const through = Math.min((above + GROUND_BREAK_DEPTH) / sink, Math.max(length, (above + GROUND_BREAK_DEPTH) * 4));
|
|
1665
|
+
return Cartesian3.multiplyByScalar(unit, through, new Cartesian3());
|
|
1666
|
+
}
|
|
1667
|
+
return Cartesian3.multiplyByScalar(unit, toStandOff, new Cartesian3());
|
|
1668
|
+
}
|
|
1669
|
+
/*
|
|
1670
|
+
* What the scene holds that the camera cares about, rescanned at most every couple of seconds.
|
|
1671
|
+
*/
|
|
1672
|
+
function scanScene(state) {
|
|
1673
|
+
var _a, _b;
|
|
1674
|
+
const now = Date.now();
|
|
1675
|
+
if (state.scan && now - state.scan.at < SCENE_SCAN_MS) {
|
|
1676
|
+
return applyOverride(state, state.scan);
|
|
1677
|
+
}
|
|
1678
|
+
const scene = state.viewer.scene;
|
|
1679
|
+
const found = { at: now, undergroundData: false, groundTileset: false };
|
|
1680
|
+
// Seeing through the ground is turned on to look at what is under it.
|
|
1681
|
+
if ((_b = (_a = scene.globe) === null || _a === void 0 ? void 0 : _a.translucency) === null || _b === void 0 ? void 0 : _b.enabled) {
|
|
1682
|
+
found.undergroundData = true;
|
|
1683
|
+
}
|
|
1684
|
+
const visit = (primitive) => {
|
|
1685
|
+
if (!primitive || primitive.show === false || (primitive.isDestroyed && primitive.isDestroyed())) {
|
|
1686
|
+
return;
|
|
1687
|
+
}
|
|
1688
|
+
if (typeof primitive.length === "number" && typeof primitive.get === "function") {
|
|
1689
|
+
for (let i = 0; i < primitive.length; i++) {
|
|
1690
|
+
visit(primitive.get(i));
|
|
1691
|
+
}
|
|
1692
|
+
return;
|
|
1693
|
+
}
|
|
1694
|
+
if (primitive[GROUND_TILESET_KEY]) {
|
|
1695
|
+
found.groundTileset = true;
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
if (!found.undergroundData && reachesBelowGround(state, lowestPointOf(primitive))) {
|
|
1699
|
+
found.undergroundData = true;
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
visit(scene.primitives);
|
|
1703
|
+
if (!found.undergroundData) {
|
|
1704
|
+
found.undergroundData = entitiesBelowGround(state);
|
|
1705
|
+
}
|
|
1706
|
+
state.scan = found;
|
|
1707
|
+
return applyOverride(state, found);
|
|
1708
|
+
}
|
|
1709
|
+
function applyOverride(state, found) {
|
|
1710
|
+
return state.undergroundOverride == null ? found : { ...found, undergroundData: state.undergroundOverride };
|
|
1711
|
+
}
|
|
1712
|
+
/*
|
|
1713
|
+
* The lowest point of a tileset or model: its root box's lowest corner, or its bounding sphere's centre.
|
|
1714
|
+
*/
|
|
1715
|
+
function lowestPointOf(primitive) {
|
|
1716
|
+
var _a, _b, _c;
|
|
1717
|
+
const volume = (_a = primitive === null || primitive === void 0 ? void 0 : primitive.root) === null || _a === void 0 ? void 0 : _a.boundingVolume;
|
|
1718
|
+
if (volume) {
|
|
1719
|
+
const region = Number.isFinite(volume.minimumHeight) && volume.rectangle;
|
|
1720
|
+
if (region) {
|
|
1721
|
+
return Cartesian3.fromRadians(Rectangle.center(volume.rectangle).longitude, Rectangle.center(volume.rectangle).latitude, volume.minimumHeight);
|
|
1722
|
+
}
|
|
1723
|
+
const box = volume.boundingVolume;
|
|
1724
|
+
const corners = box instanceof OrientedBoundingBox && typeof OrientedBoundingBox.computeCorners === "function" ? OrientedBoundingBox.computeCorners(box) : null;
|
|
1725
|
+
if (corners === null || corners === void 0 ? void 0 : corners.length) {
|
|
1726
|
+
return lowestOf(corners);
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
// A sphere's centre, as its radius reaches below the ground for anything standing on it.
|
|
1730
|
+
return (_c = (_b = primitive === null || primitive === void 0 ? void 0 : primitive.boundingSphere) === null || _b === void 0 ? void 0 : _b.center) !== null && _c !== void 0 ? _c : null;
|
|
1731
|
+
}
|
|
1732
|
+
function lowestOf(points) {
|
|
1733
|
+
var _a, _b;
|
|
1734
|
+
let lowest = null;
|
|
1735
|
+
let lowestHeight = Number.POSITIVE_INFINITY;
|
|
1736
|
+
for (const point of points) {
|
|
1737
|
+
const height = (_b = (_a = Cartographic.fromCartesian(point)) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : Number.POSITIVE_INFINITY;
|
|
1738
|
+
if (height < lowestHeight) {
|
|
1739
|
+
lowestHeight = height;
|
|
1740
|
+
lowest = point;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
return lowest;
|
|
1744
|
+
}
|
|
1745
|
+
/*
|
|
1746
|
+
* Whether a point is clearly below the ground at its place: the terrain there, else sea level.
|
|
1747
|
+
*/
|
|
1748
|
+
function reachesBelowGround(state, point) {
|
|
1749
|
+
var _a;
|
|
1750
|
+
if (!point) {
|
|
1751
|
+
return false;
|
|
1752
|
+
}
|
|
1753
|
+
const carto = ellipsoidOf(state).cartesianToCartographic(point);
|
|
1754
|
+
if (!carto) {
|
|
1755
|
+
return false;
|
|
1756
|
+
}
|
|
1757
|
+
return carto.height < ((_a = terrainHeightAt(state, carto)) !== null && _a !== void 0 ? _a : 0) - UNDERGROUND_MARGIN;
|
|
1758
|
+
}
|
|
1759
|
+
/*
|
|
1760
|
+
* Whether any of the first entities sits clearly below the ground: a point, or a line's first or last vertex.
|
|
1761
|
+
*/
|
|
1762
|
+
function entitiesBelowGround(state) {
|
|
1763
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
1764
|
+
const viewer = state.viewer;
|
|
1765
|
+
const collections = [viewer.entities];
|
|
1766
|
+
const sources = viewer.dataSources;
|
|
1767
|
+
for (let i = 0; i < ((_a = sources === null || sources === void 0 ? void 0 : sources.length) !== null && _a !== void 0 ? _a : 0); i++) {
|
|
1768
|
+
collections.push((_b = sources.get(i)) === null || _b === void 0 ? void 0 : _b.entities);
|
|
1769
|
+
}
|
|
1770
|
+
const time = (_d = (_c = viewer.clock) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : JulianDate.now();
|
|
1771
|
+
let seen = 0;
|
|
1772
|
+
for (const collection of collections) {
|
|
1773
|
+
for (const entity of (_e = collection === null || collection === void 0 ? void 0 : collection.values) !== null && _e !== void 0 ? _e : []) {
|
|
1774
|
+
if (seen++ >= SCENE_SCAN_ENTITIES) {
|
|
1775
|
+
return false;
|
|
1776
|
+
}
|
|
1777
|
+
if (!entity || entity.show === false) {
|
|
1778
|
+
continue;
|
|
1779
|
+
}
|
|
1780
|
+
const graphic = (_j = (_h = (_g = (_f = entity.model) !== null && _f !== void 0 ? _f : entity.point) !== null && _g !== void 0 ? _g : entity.billboard) !== null && _h !== void 0 ? _h : entity.box) !== null && _j !== void 0 ? _j : entity.cylinder;
|
|
1781
|
+
const reference = (_l = (_k = graphic === null || graphic === void 0 ? void 0 : graphic.heightReference) === null || _k === void 0 ? void 0 : _k.getValue) === null || _l === void 0 ? void 0 : _l.call(_k, time);
|
|
1782
|
+
if (reference === HeightReference.CLAMP_TO_GROUND) {
|
|
1783
|
+
continue;
|
|
1784
|
+
}
|
|
1785
|
+
const position = (_o = (_m = entity.position) === null || _m === void 0 ? void 0 : _m.getValue) === null || _o === void 0 ? void 0 : _o.call(_m, time);
|
|
1786
|
+
if (position) {
|
|
1787
|
+
const relative = reference === HeightReference.RELATIVE_TO_GROUND;
|
|
1788
|
+
const height = relative ? (_p = ellipsoidOf(state).cartesianToCartographic(position)) === null || _p === void 0 ? void 0 : _p.height : null;
|
|
1789
|
+
if (relative ? height < -UNDERGROUND_MARGIN : reachesBelowGround(state, position)) {
|
|
1790
|
+
return true;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
const line = entity.polyline;
|
|
1794
|
+
if (line && !((_r = (_q = line.clampToGround) === null || _q === void 0 ? void 0 : _q.getValue) === null || _r === void 0 ? void 0 : _r.call(_q, time))) {
|
|
1795
|
+
const positions = (_u = (_t = (_s = line.positions) === null || _s === void 0 ? void 0 : _s.getValue) === null || _t === void 0 ? void 0 : _t.call(_s, time)) !== null && _u !== void 0 ? _u : [];
|
|
1796
|
+
if (positions.length && (reachesBelowGround(state, positions[0]) || reachesBelowGround(state, positions[positions.length - 1]))) {
|
|
1797
|
+
return true;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
return false;
|
|
1448
1803
|
}
|
|
1449
1804
|
|
|
1450
1805
|
const CESIUM_INSPECTOR_KEY = "_nextspace_inspector";
|
|
@@ -7285,6 +7640,36 @@ var EntityLabel;
|
|
|
7285
7640
|
* Prefer declared semantics; only infers from recognisable glyphs and filename tokens, never image pixels.
|
|
7286
7641
|
*/
|
|
7287
7642
|
EntityLabel.IconPriority = GetClusterIconPriority;
|
|
7643
|
+
/*
|
|
7644
|
+
* The glyph and chip colours an icon draws with: each given one as is, a missing one inferred from the other.
|
|
7645
|
+
*/
|
|
7646
|
+
function IconColors(options) {
|
|
7647
|
+
var _a;
|
|
7648
|
+
const icon = typeof options.iconColor === "string" && options.iconColor ? options.iconColor : undefined;
|
|
7649
|
+
const background = typeof options.iconBackground === "string" && options.iconBackground.trim() ? options.iconBackground : undefined;
|
|
7650
|
+
if (background) {
|
|
7651
|
+
return { icon: icon !== null && icon !== void 0 ? icon : contrasting(background, 1), background };
|
|
7652
|
+
}
|
|
7653
|
+
if (options.iconBackground === true) {
|
|
7654
|
+
return { icon, background: (_a = contrasting(icon, ICON_BACKGROUND_ALPHA)) !== null && _a !== void 0 ? _a : contrasting("white", ICON_BACKGROUND_ALPHA) };
|
|
7655
|
+
}
|
|
7656
|
+
return { icon };
|
|
7657
|
+
}
|
|
7658
|
+
EntityLabel.IconColors = IconColors;
|
|
7659
|
+
/*
|
|
7660
|
+
* A light colour darkened, or a dark one brightened, far enough to read against it.
|
|
7661
|
+
*/
|
|
7662
|
+
function contrasting(css, alpha) {
|
|
7663
|
+
const color = css ? Color.fromCssColorString(css) : undefined;
|
|
7664
|
+
if (!color) {
|
|
7665
|
+
return undefined;
|
|
7666
|
+
}
|
|
7667
|
+
const luminance = 0.2126 * color.red + 0.7152 * color.green + 0.0722 * color.blue;
|
|
7668
|
+
const shade = luminance > 0.5 ?
|
|
7669
|
+
color.darken(ICON_BACKGROUND_BLEND, new Color()) :
|
|
7670
|
+
color.brighten(ICON_BACKGROUND_BLEND, new Color());
|
|
7671
|
+
return shade.withAlpha(alpha).toCssColorString();
|
|
7672
|
+
}
|
|
7288
7673
|
function iconLook(options) {
|
|
7289
7674
|
return {
|
|
7290
7675
|
icon: options.icon || undefined,
|
|
@@ -9966,8 +10351,10 @@ var EntityLabel;
|
|
|
9966
10351
|
}
|
|
9967
10352
|
icon.style.cssText = `font-size:${(options.iconSize || 24) * ((_a = options.iconScale) !== null && _a !== void 0 ? _a : 1)}px;line-height:1;`;
|
|
9968
10353
|
icon.style.textShadow = "0 1px 2px rgba(0, 0, 0, 0.25)";
|
|
9969
|
-
const
|
|
9970
|
-
|
|
10354
|
+
const colors = IconColors(options);
|
|
10355
|
+
// A file keeps its own colours unless one was given; only a glyph takes an inferred one.
|
|
10356
|
+
const iconColor = options.iconUrl ? (typeof options.iconColor === "string" ? options.iconColor : undefined) : colors.icon;
|
|
10357
|
+
const iconBackground = options.iconScale !== 0 ? colors.background : undefined;
|
|
9971
10358
|
if (iconColor) {
|
|
9972
10359
|
icon.style.color = iconColor;
|
|
9973
10360
|
}
|
|
@@ -10032,12 +10419,8 @@ var EntityLabel;
|
|
|
10032
10419
|
icon.textContent = options.icon || "●";
|
|
10033
10420
|
}
|
|
10034
10421
|
if (iconBackground) {
|
|
10035
|
-
const color = Color.fromCssColorString(iconColor || "white") || Color.WHITE;
|
|
10036
|
-
const luminance = 0.2126 * color.red + 0.7152 * color.green + 0.0722 * color.blue;
|
|
10037
|
-
const background = (luminance > 0.5 ? color.darken(ICON_BACKGROUND_BLEND, new Color()) :
|
|
10038
|
-
color.brighten(ICON_BACKGROUND_BLEND, new Color()));
|
|
10039
10422
|
const size = (options.iconSize || 24) * ((_c = options.iconScale) !== null && _c !== void 0 ? _c : 1);
|
|
10040
|
-
icon.style.backgroundColor =
|
|
10423
|
+
icon.style.backgroundColor = iconBackground;
|
|
10041
10424
|
icon.style.borderRadius = "50%";
|
|
10042
10425
|
icon.style.padding = `${size / 3}px`;
|
|
10043
10426
|
icon.style.display = "inline-flex";
|
|
@@ -10412,7 +10795,7 @@ var EntityLabelGroup;
|
|
|
10412
10795
|
}
|
|
10413
10796
|
return [
|
|
10414
10797
|
options.text, options.icon, options.iconUrl, options.iconClass,
|
|
10415
|
-
options.iconColor, options.iconStatus, options.iconPriority, options.iconScale
|
|
10798
|
+
options.iconColor, options.iconBackground, options.iconStatus, options.iconPriority, options.iconScale
|
|
10416
10799
|
].some(Array.isArray);
|
|
10417
10800
|
}
|
|
10418
10801
|
EntityLabelGroup.NeedsEntityData = NeedsEntityData;
|
|
@@ -10540,6 +10923,12 @@ var EntityLabelGroup;
|
|
|
10540
10923
|
return null;
|
|
10541
10924
|
}
|
|
10542
10925
|
}
|
|
10926
|
+
/*
|
|
10927
|
+
* A calculated chip colour that finds nothing for an entity draws no chip, as an unset one would.
|
|
10928
|
+
*/
|
|
10929
|
+
function resolveBackground(value, entity) {
|
|
10930
|
+
return typeof value === "boolean" ? value : resolveIcon(value, entity) || undefined;
|
|
10931
|
+
}
|
|
10543
10932
|
// How many entities one attachment read asks for.
|
|
10544
10933
|
const IMAGES_AT_ONCE = 100;
|
|
10545
10934
|
// How long on-screen requests gather before they are read together.
|
|
@@ -10777,7 +11166,7 @@ var EntityLabelGroup;
|
|
|
10777
11166
|
iconUrl: resolveIcon((_h = group.definition.options) === null || _h === void 0 ? void 0 : _h.iconUrl, entity),
|
|
10778
11167
|
iconClass: resolveIcon((_j = group.definition.options) === null || _j === void 0 ? void 0 : _j.iconClass, entity),
|
|
10779
11168
|
iconColor: resolveIcon((_k = group.definition.options) === null || _k === void 0 ? void 0 : _k.iconColor, entity),
|
|
10780
|
-
iconBackground: (_l = group.definition.options) === null || _l === void 0 ? void 0 : _l.iconBackground,
|
|
11169
|
+
iconBackground: resolveBackground((_l = group.definition.options) === null || _l === void 0 ? void 0 : _l.iconBackground, entity),
|
|
10781
11170
|
iconPriority: Number.isFinite(iconPriority) ? iconPriority : item.iconPriority,
|
|
10782
11171
|
iconStatus: (_o = resolveIcon((_m = group.definition.options) === null || _m === void 0 ? void 0 : _m.iconStatus, entity)) !== null && _o !== void 0 ? _o : item.iconStatus
|
|
10783
11172
|
};
|
|
@@ -11032,8 +11421,11 @@ var EntityLabelGroup;
|
|
|
11032
11421
|
if (!options) {
|
|
11033
11422
|
return;
|
|
11034
11423
|
}
|
|
11035
|
-
if (options.iconBackground != null &&
|
|
11036
|
-
|
|
11424
|
+
if (options.iconBackground != null &&
|
|
11425
|
+
typeof options.iconBackground !== "boolean" &&
|
|
11426
|
+
typeof options.iconBackground !== "string" &&
|
|
11427
|
+
!Array.isArray(options.iconBackground)) {
|
|
11428
|
+
throw new Error("Label iconBackground must be a boolean, a colour or a Calculator field array");
|
|
11037
11429
|
}
|
|
11038
11430
|
for (const value of [options.icon, options.iconUrl, options.iconClass, options.iconColor, options.text]) {
|
|
11039
11431
|
if (value != null && typeof value !== "string" && !Array.isArray(value)) {
|
|
@@ -30917,6 +31309,8 @@ var TilesetGooglePhotosRenderManager;
|
|
|
30917
31309
|
this.doDispose();
|
|
30918
31310
|
return;
|
|
30919
31311
|
}
|
|
31312
|
+
// Photorealistic tiles cover the Earth, so the camera treats them as the ground when the globe is hidden.
|
|
31313
|
+
CameraControls.SetGroundTileset(this.cTileset, true);
|
|
30920
31314
|
this.viewer.scene.primitives.add(this.cTileset);
|
|
30921
31315
|
this.applyColorMask();
|
|
30922
31316
|
this.viewer.scene.requestRender();
|
|
@@ -59971,7 +60365,7 @@ var StyleUtils;
|
|
|
59971
60365
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
59972
60366
|
})(StyleUtils || (StyleUtils = {}));
|
|
59973
60367
|
|
|
59974
|
-
const VERSION = "7.
|
|
60368
|
+
const VERSION = "7.8.0";
|
|
59975
60369
|
/**
|
|
59976
60370
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
59977
60371
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|