bruce-cesium 7.0.8 → 7.0.9
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 +46 -7
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +55 -17
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +2 -1
- package/dist/lib/bruce-cesium.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +1 -0
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/visual-register-culler.js +13 -0
- package/dist/lib/rendering/visual-register-culler.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +28 -3
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +2 -1
- package/dist/types/rendering/visual-register-culler.d.ts +3 -0
- package/dist/types/rendering/visuals-register.d.ts +7 -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,
|
|
3
|
-
import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style,
|
|
2
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, DistanceDisplayCondition, HeightReference, ColorBlendMode, ShadowMode, ClassificationType, Model, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, ArcType, CornerType, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, OrthographicFrustum, EasingFunction, BoundingSphere, Intersect, CustomDataSource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, GeometryInstance, PolygonPipeline, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
|
|
3
|
+
import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Api, Bounds, Color as Color$1, Geometry, Carto, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, DataLab, DelayQueue, EntityHistoricData, AccountConcept, RecordChangeFeed, BruceApi, EntityRelation, ProgramKey, EntitySource, ProjectViewLegacyTile, ProjectViewTile, Camera, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session, EntityRelationType } from 'bruce-models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -6323,6 +6323,7 @@ const LAST_RECHECK_KEY = Symbol("LAST_RECHECK_KEY");
|
|
|
6323
6323
|
// Attached to a cesium viewer to indicate a re-check should be done.
|
|
6324
6324
|
// This is to override the cache that avoids re-checking when the camera hasn't moved.
|
|
6325
6325
|
const SHOULD_RECHECK_KEY = Symbol("SHOULD_RECHECK_KEY");
|
|
6326
|
+
const RECHECK_KICK_KEY = Symbol("RECHECK_KICK_KEY");
|
|
6326
6327
|
/**
|
|
6327
6328
|
* We will recheck if the camera has turned or moved enough.
|
|
6328
6329
|
* @param viewer
|
|
@@ -6613,6 +6614,7 @@ var VisualRegisterCuller;
|
|
|
6613
6614
|
runCullChecker(register);
|
|
6614
6615
|
lastCullCheck = new Date();
|
|
6615
6616
|
}, 1000);
|
|
6617
|
+
register.Viewer[RECHECK_KICK_KEY] = () => { var _a; return (_a = checkQueue === null || checkQueue === void 0 ? void 0 : checkQueue.Call) === null || _a === void 0 ? void 0 : _a.call(checkQueue); };
|
|
6616
6618
|
let moveStartRemoval = register.Viewer.camera.moveStart.addEventListener(() => {
|
|
6617
6619
|
var _a;
|
|
6618
6620
|
(_a = checkQueue.Call) === null || _a === void 0 ? void 0 : _a.call(checkQueue);
|
|
@@ -6655,6 +6657,9 @@ var VisualRegisterCuller;
|
|
|
6655
6657
|
checkWaiting = false;
|
|
6656
6658
|
checkQueue === null || checkQueue === void 0 ? void 0 : checkQueue.Dispose();
|
|
6657
6659
|
checkQueue = null;
|
|
6660
|
+
if (register.Viewer) {
|
|
6661
|
+
delete register.Viewer[RECHECK_KICK_KEY];
|
|
6662
|
+
}
|
|
6658
6663
|
};
|
|
6659
6664
|
}
|
|
6660
6665
|
VisualRegisterCuller.Monitor = Monitor;
|
|
@@ -6750,8 +6755,16 @@ var VisualRegisterCuller;
|
|
|
6750
6755
|
return false;
|
|
6751
6756
|
}
|
|
6752
6757
|
VisualRegisterCuller.IsCulled = IsCulled;
|
|
6758
|
+
/**
|
|
6759
|
+
* Asks for the next cull pass to actually re-measure, and brings that pass forward.
|
|
6760
|
+
*/
|
|
6753
6761
|
function MarkShouldRecheck(viewer) {
|
|
6762
|
+
var _a, _b;
|
|
6763
|
+
if (!viewer || ((_a = viewer.isDestroyed) === null || _a === void 0 ? void 0 : _a.call(viewer))) {
|
|
6764
|
+
return;
|
|
6765
|
+
}
|
|
6754
6766
|
viewer[SHOULD_RECHECK_KEY] = true;
|
|
6767
|
+
(_b = viewer[RECHECK_KICK_KEY]) === null || _b === void 0 ? void 0 : _b.call(viewer);
|
|
6755
6768
|
}
|
|
6756
6769
|
VisualRegisterCuller.MarkShouldRecheck = MarkShouldRecheck;
|
|
6757
6770
|
})(VisualRegisterCuller || (VisualRegisterCuller = {}));
|
|
@@ -8210,6 +8223,26 @@ var VisualsRegister;
|
|
|
8210
8223
|
CesiumEntityStyler.UpdateColorSetting("highlight", color);
|
|
8211
8224
|
}
|
|
8212
8225
|
}
|
|
8226
|
+
/**
|
|
8227
|
+
* Whether any rego for this entity is currently held as being edited.
|
|
8228
|
+
*/
|
|
8229
|
+
IsEditing(params) {
|
|
8230
|
+
const { entityId, menuItemId } = params;
|
|
8231
|
+
const regos = this.rego[entityId];
|
|
8232
|
+
if (!(regos === null || regos === void 0 ? void 0 : regos.length)) {
|
|
8233
|
+
return false;
|
|
8234
|
+
}
|
|
8235
|
+
for (let i = 0; i < regos.length; i++) {
|
|
8236
|
+
const rego = regos[i];
|
|
8237
|
+
if (menuItemId && rego.menuItemId !== menuItemId) {
|
|
8238
|
+
continue;
|
|
8239
|
+
}
|
|
8240
|
+
if (rego.editing) {
|
|
8241
|
+
return true;
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8244
|
+
return false;
|
|
8245
|
+
}
|
|
8213
8246
|
/**
|
|
8214
8247
|
* Marks visuals as being actively edited, which exempts them from culling until it is turned back off.
|
|
8215
8248
|
*/
|
|
@@ -8230,12 +8263,15 @@ var VisualsRegister;
|
|
|
8230
8263
|
if (menuItemId && rego.menuItemId !== menuItemId) {
|
|
8231
8264
|
continue;
|
|
8232
8265
|
}
|
|
8233
|
-
|
|
8266
|
+
const wasEditing = Boolean(rego.editing);
|
|
8267
|
+
if (wasEditing == Boolean(editing) && editing) {
|
|
8234
8268
|
continue;
|
|
8235
8269
|
}
|
|
8236
8270
|
// Null rather than false, so the rego does not carry a key for every visual ever edited.
|
|
8237
8271
|
rego.editing = editing ? true : null;
|
|
8238
|
-
|
|
8272
|
+
if (wasEditing != Boolean(editing)) {
|
|
8273
|
+
changed = true;
|
|
8274
|
+
}
|
|
8239
8275
|
if (editing) {
|
|
8240
8276
|
const parts = EntityUtils.GatherEntity({
|
|
8241
8277
|
entity: rego.visual
|
|
@@ -8254,7 +8290,6 @@ var VisualsRegister;
|
|
|
8254
8290
|
}
|
|
8255
8291
|
}
|
|
8256
8292
|
else {
|
|
8257
|
-
// The geometry almost certainly moved, so what was measured before is worthless.
|
|
8258
8293
|
VisualRegisterCuller.InvalidateBounds(rego.visual);
|
|
8259
8294
|
VisualRegisterCuller.MarkShouldRecheck(this.viewer);
|
|
8260
8295
|
}
|
|
@@ -8730,6 +8765,9 @@ var VisualsRegister;
|
|
|
8730
8765
|
// Tilesets will often add -> remove -> add because of how tiles load in and out of the scene.
|
|
8731
8766
|
// To avoid flickering, we'll just replace rather than remove -> add.
|
|
8732
8767
|
if (!rego.tilesetId && params.removePrior != false) {
|
|
8768
|
+
if (!rego.editing && this.IsEditing({ entityId: rego.entityId, menuItemId: rego.menuItemId })) {
|
|
8769
|
+
rego.editing = true;
|
|
8770
|
+
}
|
|
8733
8771
|
this.RemoveRegos({
|
|
8734
8772
|
entityId: rego.entityId,
|
|
8735
8773
|
menuItemId: rego.menuItemId,
|
|
@@ -39695,6 +39733,7 @@ var EntityRenderEngine;
|
|
|
39695
39733
|
}
|
|
39696
39734
|
VisualRegisterCuller.InvalidateBounds(cEntity);
|
|
39697
39735
|
});
|
|
39736
|
+
VisualRegisterCuller.MarkShouldRecheck(params.viewer);
|
|
39698
39737
|
return {
|
|
39699
39738
|
entities: cEntities,
|
|
39700
39739
|
updated
|
|
@@ -40463,7 +40502,7 @@ var StyleUtils;
|
|
|
40463
40502
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
40464
40503
|
})(StyleUtils || (StyleUtils = {}));
|
|
40465
40504
|
|
|
40466
|
-
const VERSION = "7.0.
|
|
40505
|
+
const VERSION = "7.0.9";
|
|
40467
40506
|
/**
|
|
40468
40507
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
40469
40508
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|
|
@@ -40480,5 +40519,5 @@ const getENVIRONMENT = () => {
|
|
|
40480
40519
|
return ENVIRONMENT;
|
|
40481
40520
|
};
|
|
40482
40521
|
|
|
40483
|
-
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
|
|
40522
|
+
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualRegisterCuller, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
|
|
40484
40523
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|