bruce-cesium 5.5.1 → 5.5.3
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 +51 -8
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +50 -7
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/cesium-animated-property.js +28 -5
- package/dist/lib/rendering/cesium-animated-property.js.map +1 -1
- package/dist/lib/rendering/tile-render-engine.js +21 -1
- package/dist/lib/rendering/tile-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
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, 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, DistanceDisplayCondition,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, Matrix4, Matrix3, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -1670,11 +1670,34 @@ var CesiumAnimatedProperty;
|
|
|
1670
1670
|
pos3d = this.lastCalcPos3d;
|
|
1671
1671
|
}
|
|
1672
1672
|
// Calculate heading.
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1673
|
+
if (this.lastCalcPos3dApplyOverTimeTarget) {
|
|
1674
|
+
if (this.lastCalcPos3d) {
|
|
1675
|
+
const minDistanceThreshold = 0.05;
|
|
1676
|
+
const currentToTargetDistance = Cartesian3.distance(this.lastCalcPos3d, this.lastCalcPos3dApplyOverTimeTarget);
|
|
1677
|
+
if (currentToTargetDistance >= minDistanceThreshold) {
|
|
1678
|
+
const lastPos = {
|
|
1679
|
+
pos3d: this.lastCalcPos3d,
|
|
1680
|
+
dateTime: this.lastCalcPos3dApplyOverTimeTimeStart ? new Date(this.lastCalcPos3dApplyOverTimeTimeStart) : null,
|
|
1681
|
+
heading: null
|
|
1682
|
+
};
|
|
1683
|
+
const nextPos = {
|
|
1684
|
+
pos3d: this.lastCalcPos3dApplyOverTimeTarget,
|
|
1685
|
+
dateTime: null,
|
|
1686
|
+
heading: null
|
|
1687
|
+
};
|
|
1688
|
+
if (lastPos && nextPos) {
|
|
1689
|
+
this.lastCalcHeading = this.calculateHeading(nowTimeMs, lastPos, nextPos);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
else {
|
|
1695
|
+
const posses = this.positions;
|
|
1696
|
+
const lastPos = posses[targetPosition.indexLast];
|
|
1697
|
+
const nextPos = posses[targetPosition.indexNext];
|
|
1698
|
+
if (lastPos && nextPos) {
|
|
1699
|
+
this.lastCalcHeading = this.calculateHeading(nowTimeMs, lastPos, nextPos);
|
|
1700
|
+
}
|
|
1678
1701
|
}
|
|
1679
1702
|
// Provide the calculated values to the caller.
|
|
1680
1703
|
this.onUpdate(pos3d, this.lastCalcHeading);
|
|
@@ -24086,8 +24109,28 @@ var TileRenderEngine;
|
|
|
24086
24109
|
}
|
|
24087
24110
|
else if (tileset.type === Tileset.EType.ExternalTerrain) {
|
|
24088
24111
|
const settings = tileset.settings;
|
|
24089
|
-
url = settings.url;
|
|
24090
24112
|
vertexes = settings.requestVertexNormals == null ? true : settings.requestVertexNormals;
|
|
24113
|
+
if (!settings.terrainType || settings.terrainType === "Default") {
|
|
24114
|
+
url = settings.url;
|
|
24115
|
+
}
|
|
24116
|
+
else if (settings.terrainType == "CesiumIon") {
|
|
24117
|
+
const ionId = settings.externalId;
|
|
24118
|
+
const key = settings.key ? settings.key : await findKey(params.apiGetter, params.apiGetter.accountId, ProgramKey.EProgramId.CesiumIon);
|
|
24119
|
+
const resource = IonResource.fromAssetId(Number(ionId), {
|
|
24120
|
+
accessToken: key
|
|
24121
|
+
});
|
|
24122
|
+
if (CesiumTerrainProvider.hasOwnProperty("fromUrl")) {
|
|
24123
|
+
provider = await CESIUM.CesiumTerrainProvider.fromUrl(resource, {
|
|
24124
|
+
requestVertexNormals: vertexes
|
|
24125
|
+
});
|
|
24126
|
+
}
|
|
24127
|
+
else {
|
|
24128
|
+
provider = new CESIUM.CesiumTerrainProvider({
|
|
24129
|
+
url: resource,
|
|
24130
|
+
requestVertexNormals: vertexes
|
|
24131
|
+
});
|
|
24132
|
+
}
|
|
24133
|
+
}
|
|
24091
24134
|
}
|
|
24092
24135
|
else {
|
|
24093
24136
|
console.error("Invalid tileset type.", tileset);
|
|
@@ -30856,7 +30899,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
30856
30899
|
}
|
|
30857
30900
|
}
|
|
30858
30901
|
|
|
30859
|
-
const VERSION = "5.5.
|
|
30902
|
+
const VERSION = "5.5.3";
|
|
30860
30903
|
|
|
30861
30904
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_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 };
|
|
30862
30905
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|