bruce-cesium 5.7.0 → 5.7.2
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 +49 -6
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -5
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/view-render-engine.js +13 -4
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/utils/view-utils.js +34 -0
- package/dist/lib/utils/view-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/utils/view-utils.d.ts +5 -0
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -3229,6 +3229,40 @@
|
|
|
3229
3229
|
}
|
|
3230
3230
|
viewer[CESIUM_TIMELINE_LIVE_KEY] = false;
|
|
3231
3231
|
}
|
|
3232
|
+
function SetGlobeDetails(params) {
|
|
3233
|
+
let { viewer, hidden, baseColor } = params;
|
|
3234
|
+
const scene = viewer === null || viewer === void 0 ? void 0 : viewer.scene;
|
|
3235
|
+
if (!(scene === null || scene === void 0 ? void 0 : scene.globe)) {
|
|
3236
|
+
return;
|
|
3237
|
+
}
|
|
3238
|
+
if (hidden == null) {
|
|
3239
|
+
hidden = !scene.globe.show;
|
|
3240
|
+
}
|
|
3241
|
+
else {
|
|
3242
|
+
scene.globe.show = !hidden;
|
|
3243
|
+
}
|
|
3244
|
+
if (baseColor == null) {
|
|
3245
|
+
baseColor = scene.globe.baseColor;
|
|
3246
|
+
}
|
|
3247
|
+
// When globe is off, we'll also hide the stars/moon.
|
|
3248
|
+
// We also grab the globe color and apply it to the sky.
|
|
3249
|
+
if (hidden) {
|
|
3250
|
+
scene.skyBox.show = false;
|
|
3251
|
+
scene.skyAtmosphere.show = false;
|
|
3252
|
+
scene.sun.show = false;
|
|
3253
|
+
scene.moon.show = false;
|
|
3254
|
+
scene.backgroundColor = baseColor.clone();
|
|
3255
|
+
}
|
|
3256
|
+
else {
|
|
3257
|
+
scene.skyBox.show = true;
|
|
3258
|
+
scene.skyAtmosphere.show = true;
|
|
3259
|
+
scene.sun.show = true;
|
|
3260
|
+
scene.moon.show = true;
|
|
3261
|
+
scene.backgroundColor = Cesium.Color.BLACK;
|
|
3262
|
+
}
|
|
3263
|
+
scene.globe.baseColor = baseColor;
|
|
3264
|
+
}
|
|
3265
|
+
ViewUtils.SetGlobeDetails = SetGlobeDetails;
|
|
3232
3266
|
})(exports.ViewUtils || (exports.ViewUtils = {}));
|
|
3233
3267
|
|
|
3234
3268
|
function traverseEntity(cEntity, arr, ignoreParent, onlyEditable, onlySelectable) {
|
|
@@ -25560,7 +25594,7 @@
|
|
|
25560
25594
|
}
|
|
25561
25595
|
let camera = ((_d = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Camera) !== null && _d !== void 0 ? _d : {});
|
|
25562
25596
|
if (contentType == BModels.ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
25563
|
-
if (!BModels.Cartes.ValidateCartes3(camera)) {
|
|
25597
|
+
if (!BModels.Cartes.ValidateCartes3(camera) && !BModels.Carto.ValidateCarto(camera)) {
|
|
25564
25598
|
camera = {
|
|
25565
25599
|
altitude: 500,
|
|
25566
25600
|
latitude: 0,
|
|
@@ -25697,7 +25731,6 @@
|
|
|
25697
25731
|
// TODO: Need global default.
|
|
25698
25732
|
baseColor = "#0326BE";
|
|
25699
25733
|
}
|
|
25700
|
-
scene.globe.baseColor = Cesium.Color.fromCssColorString(baseColor);
|
|
25701
25734
|
let globeHidden = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeHidden;
|
|
25702
25735
|
if (globeHidden == null) {
|
|
25703
25736
|
globeHidden = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.globeHidden;
|
|
@@ -25705,7 +25738,11 @@
|
|
|
25705
25738
|
if (globeHidden == null) {
|
|
25706
25739
|
globeHidden = false;
|
|
25707
25740
|
}
|
|
25708
|
-
|
|
25741
|
+
exports.ViewUtils.SetGlobeDetails({
|
|
25742
|
+
viewer: viewer,
|
|
25743
|
+
hidden: globeHidden,
|
|
25744
|
+
baseColor: Cesium.Color.fromCssColorString(baseColor)
|
|
25745
|
+
});
|
|
25709
25746
|
let terrainWireframe = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrainWireframe;
|
|
25710
25747
|
if (terrainWireframe == null) {
|
|
25711
25748
|
terrainWireframe = (_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.terrainWireframe;
|
|
@@ -25957,6 +25994,9 @@
|
|
|
25957
25994
|
}
|
|
25958
25995
|
}
|
|
25959
25996
|
}
|
|
25997
|
+
if (contentType === BModels.ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
25998
|
+
imagery = [];
|
|
25999
|
+
}
|
|
25960
26000
|
// We don't wait for imageries to load, this does not affect rendering other things.
|
|
25961
26001
|
exports.TileRenderEngine.Map.Navigator.Render({
|
|
25962
26002
|
apiGetter: params.apiGetter,
|
|
@@ -26056,6 +26096,9 @@
|
|
|
26056
26096
|
// TODO: Need global default.
|
|
26057
26097
|
gOcclusion = true;
|
|
26058
26098
|
}
|
|
26099
|
+
if (contentType === BModels.ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
26100
|
+
gOcclusion = false;
|
|
26101
|
+
}
|
|
26059
26102
|
scene.globe.depthTestAgainstTerrain = Boolean(gOcclusion);
|
|
26060
26103
|
}
|
|
26061
26104
|
(function (ViewRenderEngine) {
|
|
@@ -26171,7 +26214,7 @@
|
|
|
26171
26214
|
}
|
|
26172
26215
|
let camera = ((_d = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Camera) !== null && _d !== void 0 ? _d : {});
|
|
26173
26216
|
if (contentType == BModels.ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE) {
|
|
26174
|
-
if (!BModels.Cartes.ValidateCartes3(camera)) {
|
|
26217
|
+
if (!BModels.Cartes.ValidateCartes3(camera) && !BModels.Carto.ValidateCarto(camera)) {
|
|
26175
26218
|
camera = {
|
|
26176
26219
|
altitude: 500,
|
|
26177
26220
|
latitude: 0,
|
|
@@ -31990,7 +32033,7 @@
|
|
|
31990
32033
|
}
|
|
31991
32034
|
}
|
|
31992
32035
|
|
|
31993
|
-
const VERSION = "5.7.
|
|
32036
|
+
const VERSION = "5.7.2";
|
|
31994
32037
|
|
|
31995
32038
|
exports.VERSION = VERSION;
|
|
31996
32039
|
exports.isOutlineChanged = isOutlineChanged;
|