bruce-cesium 6.1.5 → 6.1.7
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 +34 -26
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +32 -24
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js +5 -7
- package/dist/lib/rendering/entity-render-engine-model3d.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +26 -16
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark,
|
|
1
|
+
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, AbstractApi, Session } 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,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, DistanceDisplayCondition, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, NearFarScalar, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -7172,7 +7172,7 @@ var EntityRenderEngineModel3d;
|
|
|
7172
7172
|
* @returns
|
|
7173
7173
|
*/
|
|
7174
7174
|
function Render(params) {
|
|
7175
|
-
var _a, _b, _c, _d
|
|
7175
|
+
var _a, _b, _c, _d;
|
|
7176
7176
|
const entity = params.entity;
|
|
7177
7177
|
if (!params.entityHistoric) {
|
|
7178
7178
|
params.entityHistoric = [];
|
|
@@ -7364,6 +7364,8 @@ var EntityRenderEngineModel3d;
|
|
|
7364
7364
|
cEntity.model.colorBlendAmount = new ConstantProperty(blendAmount);
|
|
7365
7365
|
cEntity.model.colorBlendMode = new ConstantProperty(blendMode);
|
|
7366
7366
|
cEntity.model.distanceDisplayCondition = new ConstantProperty(EntityRenderEngine.GetDisplayCondition(params.minDistance, params.maxDistance));
|
|
7367
|
+
const dateTimeStr = (_b = (_a = entity.Bruce.Outline) === null || _a === void 0 ? void 0 : _a.find(x => !!x.DateTime)) === null || _b === void 0 ? void 0 : _b.DateTime;
|
|
7368
|
+
const dateTime = dateTimeStr ? new Date(dateTimeStr) : null;
|
|
7367
7369
|
if (cEntity.position && cEntity.position["CesiumAnimatedProperty.AnimatePositionSeries"]) {
|
|
7368
7370
|
animatePosition = cEntity.position["CesiumAnimatedProperty.AnimatePositionSeries"];
|
|
7369
7371
|
const animateSeries = animatePosition;
|
|
@@ -7371,8 +7373,6 @@ var EntityRenderEngineModel3d;
|
|
|
7371
7373
|
if (series.length) {
|
|
7372
7374
|
animateSeries.SupplementSeries(series);
|
|
7373
7375
|
}
|
|
7374
|
-
const dateTimeStr = (_b = (_a = entity.Bruce.Outline) === null || _a === void 0 ? void 0 : _a.find(x => !!x.DateTime)) === null || _b === void 0 ? void 0 : _b.DateTime;
|
|
7375
|
-
const dateTime = dateTimeStr ? new Date(dateTimeStr) : null;
|
|
7376
7376
|
if (dateTime) {
|
|
7377
7377
|
animateSeries.UpdatePositionForDateTime(pos3d, dateTime, !EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.heading) ? null : heading);
|
|
7378
7378
|
}
|
|
@@ -7395,8 +7395,6 @@ var EntityRenderEngineModel3d;
|
|
|
7395
7395
|
cEntity.position["CesiumAnimatedProperty.AnimatePositionSeries"] = animatePosition;
|
|
7396
7396
|
}
|
|
7397
7397
|
else {
|
|
7398
|
-
const dateTimeStr = (_d = (_c = entity.Bruce.Outline) === null || _c === void 0 ? void 0 : _c.find(x => !!x.DateTime)) === null || _d === void 0 ? void 0 : _d.DateTime;
|
|
7399
|
-
const dateTime = dateTimeStr ? new Date(dateTimeStr) : null;
|
|
7400
7398
|
const posChanged = !prevPos3d || !Cartesian3.equals(prevPos3d, pos3d);
|
|
7401
7399
|
if (posChanged) {
|
|
7402
7400
|
let posses = [];
|
|
@@ -7426,7 +7424,7 @@ var EntityRenderEngineModel3d;
|
|
|
7426
7424
|
}
|
|
7427
7425
|
}
|
|
7428
7426
|
// If we're animating position then we can animate orientation too based on the interpolated position.
|
|
7429
|
-
if (animatePosition && animatePosition instanceof CesiumAnimatedProperty.AnimatePositionSeries && animatePosition.GetOrient) {
|
|
7427
|
+
if (dateTime && animatePosition && animatePosition instanceof CesiumAnimatedProperty.AnimatePositionSeries && animatePosition.GetOrient) {
|
|
7430
7428
|
cEntity.orientation = new CallbackProperty(() => {
|
|
7431
7429
|
return animatePosition.GetOrient();
|
|
7432
7430
|
}, false);
|
|
@@ -7571,7 +7569,7 @@ var EntityRenderEngineModel3d;
|
|
|
7571
7569
|
// Generate a polyline 'track' for the historic data.
|
|
7572
7570
|
// We do this for historic data that exists and is moving.
|
|
7573
7571
|
if (shouldShowTrack && animatePosition && animatePosition instanceof CesiumAnimatedProperty.AnimatePositionSeries && animatePosition.GetSeries) {
|
|
7574
|
-
const lStyle = (
|
|
7572
|
+
const lStyle = (_d = (_c = params.fullStyle) === null || _c === void 0 ? void 0 : _c.polylineStyle) !== null && _d !== void 0 ? _d : {};
|
|
7575
7573
|
const bColor = lStyle.lineColor ? Calculator.GetColor(lStyle.lineColor, entity, params.tags) : null;
|
|
7576
7574
|
const cColor = bColor ? ColorToCColor(bColor) : Color.fromCssColorString("rgba(255, 193, 7, 0.8)");
|
|
7577
7575
|
let width = lStyle.lineWidth ? EnsureNumber(Calculator.GetNumber(lStyle.lineWidth, entity, params.tags)) : 2;
|
|
@@ -16891,11 +16889,12 @@ var TilesetRenderEngine;
|
|
|
16891
16889
|
}
|
|
16892
16890
|
TilesetRenderEngine.OnTilesetReady = OnTilesetReady;
|
|
16893
16891
|
function ApplyPosition(params) {
|
|
16894
|
-
var _a;
|
|
16892
|
+
var _a, _b;
|
|
16895
16893
|
const cTileset = params.cTileset;
|
|
16896
16894
|
const root = cTileset.root;
|
|
16897
16895
|
const position = params.position;
|
|
16898
|
-
|
|
16896
|
+
const ucsTransform = ((_a = position.ucs) === null || _a === void 0 ? void 0 : _a.transform) || {};
|
|
16897
|
+
let location = ((_b = position.ucs) === null || _b === void 0 ? void 0 : _b.location) ? position.ucs.location : position.location;
|
|
16899
16898
|
let transform = position.transform;
|
|
16900
16899
|
transform = {
|
|
16901
16900
|
heading: 0,
|
|
@@ -16908,24 +16907,33 @@ var TilesetRenderEngine;
|
|
|
16908
16907
|
...transform
|
|
16909
16908
|
};
|
|
16910
16909
|
transform.scale = EnsureNumber(transform.scale);
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
// If we're in model-space we'll just go at 0,0 lat/lon and no h/p/r from the coords.
|
|
16910
|
+
// In model-space we focus on the UCS.
|
|
16911
|
+
// There's no location as we center the view around it.
|
|
16912
|
+
// TODO: although we should render the model relative to the UCS.
|
|
16915
16913
|
if (params.modelSpace) {
|
|
16916
16914
|
location = null;
|
|
16917
16915
|
transform = {
|
|
16918
|
-
heading: 0,
|
|
16919
|
-
pitch: 0,
|
|
16920
|
-
roll: 0,
|
|
16921
|
-
scale: EnsureNumber(
|
|
16922
|
-
x: 0,
|
|
16923
|
-
y: 0,
|
|
16924
|
-
z: 0
|
|
16916
|
+
heading: EnsureNumber(ucsTransform.heading, 0),
|
|
16917
|
+
pitch: EnsureNumber(ucsTransform.pitch, 0),
|
|
16918
|
+
roll: EnsureNumber(ucsTransform.roll, 0),
|
|
16919
|
+
scale: EnsureNumber(ucsTransform.scale, 1),
|
|
16920
|
+
x: EnsureNumber(ucsTransform.x, 0),
|
|
16921
|
+
y: EnsureNumber(ucsTransform.y, 0),
|
|
16922
|
+
z: EnsureNumber(ucsTransform.z, 0)
|
|
16925
16923
|
};
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16924
|
+
}
|
|
16925
|
+
// If not in model-space then scale/add UCS transform to the entity transform.
|
|
16926
|
+
else {
|
|
16927
|
+
transform.scale *= EnsureNumber(ucsTransform.scale, 1);
|
|
16928
|
+
transform.heading += EnsureNumber(ucsTransform.heading, 0);
|
|
16929
|
+
transform.pitch += EnsureNumber(ucsTransform.pitch, 0);
|
|
16930
|
+
transform.roll += EnsureNumber(ucsTransform.roll, 0);
|
|
16931
|
+
transform.x += EnsureNumber(ucsTransform.x, 0);
|
|
16932
|
+
transform.y += EnsureNumber(ucsTransform.y, 0);
|
|
16933
|
+
transform.z += EnsureNumber(ucsTransform.z, 0);
|
|
16934
|
+
}
|
|
16935
|
+
if (transform.scale <= 0) {
|
|
16936
|
+
transform.scale = 0.000001;
|
|
16929
16937
|
}
|
|
16930
16938
|
/**
|
|
16931
16939
|
* Very cursed.
|
|
@@ -33759,7 +33767,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
33759
33767
|
}
|
|
33760
33768
|
}
|
|
33761
33769
|
|
|
33762
|
-
const VERSION = "6.1.
|
|
33770
|
+
const VERSION = "6.1.7";
|
|
33763
33771
|
|
|
33764
33772
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, LiveCursor, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, 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, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, 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 };
|
|
33765
33773
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|