bruce-cesium 4.9.2 → 4.9.4
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 +18 -4
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +17 -3
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/visual-register-culler.js +12 -0
- package/dist/lib/rendering/visual-register-culler.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +4 -2
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, Matrix4, Matrix3, IonResource, Quaternion, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -5684,6 +5684,7 @@ function runCullChecker(register) {
|
|
|
5684
5684
|
// We'll use the terrain cache per culler cycle.
|
|
5685
5685
|
_terrainCache.Clear();
|
|
5686
5686
|
checkInterval = setInterval(() => {
|
|
5687
|
+
var _a;
|
|
5687
5688
|
if (viewer.isDestroyed() || !viewer.scene) {
|
|
5688
5689
|
clearInterval(checkInterval);
|
|
5689
5690
|
checkInterval = null;
|
|
@@ -5698,11 +5699,22 @@ function runCullChecker(register) {
|
|
|
5698
5699
|
const regos = register.GetRegos({
|
|
5699
5700
|
entityId
|
|
5700
5701
|
});
|
|
5702
|
+
regos.sort((a, b) => {
|
|
5703
|
+
return b.priority - a.priority;
|
|
5704
|
+
});
|
|
5705
|
+
let highestPriority = (_a = regos[0]) === null || _a === void 0 ? void 0 : _a.priority;
|
|
5706
|
+
if (!highestPriority) {
|
|
5707
|
+
highestPriority = 0;
|
|
5708
|
+
}
|
|
5701
5709
|
for (let j = 0; j < regos.length; j++) {
|
|
5702
5710
|
const rego = regos[j];
|
|
5703
5711
|
if (isCullingIgnored(viewer, rego)) {
|
|
5704
5712
|
continue;
|
|
5705
5713
|
}
|
|
5714
|
+
// We skip if it's hidden due to being under the highest priority.
|
|
5715
|
+
else if (rego.priority < highestPriority) {
|
|
5716
|
+
continue;
|
|
5717
|
+
}
|
|
5706
5718
|
const state = register.GetState({
|
|
5707
5719
|
entityId: entityId,
|
|
5708
5720
|
menuItemId: rego.menuItemId
|
|
@@ -9508,7 +9520,7 @@ function updateEntity(viewer, entityId, register, refresh, cache = {}) {
|
|
|
9508
9520
|
// So if a new visual is added that's higher priority, all lower ones get hidden.
|
|
9509
9521
|
// By default, everything has 0 priority unless explicitly set.
|
|
9510
9522
|
const priority = rego.priority ? rego.priority : 0;
|
|
9511
|
-
return priority
|
|
9523
|
+
return priority >= highestPriority;
|
|
9512
9524
|
}
|
|
9513
9525
|
for (let i = 0; i < regos.length; i++) {
|
|
9514
9526
|
const rego = regos[i];
|
|
@@ -10743,7 +10755,9 @@ var VisualsRegister;
|
|
|
10743
10755
|
if (menuItemId) {
|
|
10744
10756
|
return entityRegos.find(r => r.menuItemId === menuItemId);
|
|
10745
10757
|
}
|
|
10746
|
-
return entityRegos.
|
|
10758
|
+
return entityRegos.sort((a, b) => {
|
|
10759
|
+
return b.priority - a.priority;
|
|
10760
|
+
})[0];
|
|
10747
10761
|
}
|
|
10748
10762
|
}
|
|
10749
10763
|
/**
|
|
@@ -28333,7 +28347,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
28333
28347
|
}
|
|
28334
28348
|
}
|
|
28335
28349
|
|
|
28336
|
-
const VERSION = "4.9.
|
|
28350
|
+
const VERSION = "4.9.4";
|
|
28337
28351
|
|
|
28338
28352
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
28339
28353
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|