bruce-cesium 6.7.6 → 6.7.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 +40 -12
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +37 -8
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js +36 -7
- package/dist/lib/rendering/render-managers/tilesets/tileset-google-photos-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +2 -1
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/tileset-render-engine.d.ts +10 -0
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
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, PolygonHierarchy, PolylineGraphics, ArcType, CornerType, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider,
|
|
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, 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, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, BoundingSphere, GeometryInstance, PolygonPipeline, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
|
|
3
3
|
import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Api, Bounds, 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
|
/**
|
|
@@ -19134,7 +19134,7 @@ var RelationsRenderManager;
|
|
|
19134
19134
|
})(RelationsRenderManager || (RelationsRenderManager = {}));
|
|
19135
19135
|
|
|
19136
19136
|
var TilesetGooglePhotosRenderManager;
|
|
19137
|
-
(function (TilesetGooglePhotosRenderManager) {
|
|
19137
|
+
(function (TilesetGooglePhotosRenderManager$$1) {
|
|
19138
19138
|
class Manager {
|
|
19139
19139
|
get Disposed() {
|
|
19140
19140
|
return this.disposed;
|
|
@@ -19176,7 +19176,7 @@ var TilesetGooglePhotosRenderManager;
|
|
|
19176
19176
|
this.item = params.item;
|
|
19177
19177
|
}
|
|
19178
19178
|
(async () => {
|
|
19179
|
-
var _a;
|
|
19179
|
+
var _a, _b, _c;
|
|
19180
19180
|
// If the tileset already exists then we just need to update the style.
|
|
19181
19181
|
if (this.cTileset) {
|
|
19182
19182
|
const colorCss = this.item.colorMask;
|
|
@@ -19203,16 +19203,44 @@ var TilesetGooglePhotosRenderManager;
|
|
|
19203
19203
|
console.warn("Cesium version does not support 'createGooglePhotorealistic3DTileset' so Google Photos tileset will not be rendered.");
|
|
19204
19204
|
return;
|
|
19205
19205
|
}
|
|
19206
|
+
// Proxy path: key injected server-side.
|
|
19206
19207
|
if (api.IsVersionAtLeast(BruceApi.VERSION_WITH_PROXIES)) {
|
|
19207
|
-
//
|
|
19208
|
-
|
|
19208
|
+
// If we have a Google token we'll proxy through that.
|
|
19209
|
+
// Otherwise use Cesium Ion to load as a resource.
|
|
19210
|
+
const { programKeys } = await ProgramKey.GetList({
|
|
19211
|
+
api: this.getters.GetBruceApi()
|
|
19212
|
+
});
|
|
19213
|
+
const hasGoogleToken = Boolean((_a = programKeys.find(x => x.ProgramId === ProgramKey.EProgramId.GooglePhotogrammetry)) === null || _a === void 0 ? void 0 : _a.Available);
|
|
19214
|
+
// Must have own iot token, this ensures we don't use our template one for loading customer photogrammetry.
|
|
19215
|
+
const hasIonToken = Boolean((_b = programKeys.find(x => x.ProgramId === ProgramKey.EProgramId.CesiumIon)) === null || _b === void 0 ? void 0 : _b.Available);
|
|
19209
19216
|
if (this.disposed) {
|
|
19210
19217
|
this.doDispose();
|
|
19211
19218
|
return;
|
|
19212
19219
|
}
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19220
|
+
// WARNING: we are routing through ion first right now as it is faster.
|
|
19221
|
+
// Should be a user-decision and we should improve our google proxying.
|
|
19222
|
+
if (hasIonToken && Ion.defaultServer) {
|
|
19223
|
+
const loadUrl = await IonResource.fromAssetId(2275207, undefined);
|
|
19224
|
+
if (this.disposed) {
|
|
19225
|
+
this.doDispose();
|
|
19226
|
+
return;
|
|
19227
|
+
}
|
|
19228
|
+
this.cTileset = await createTileset(loadUrl, {}, true);
|
|
19229
|
+
}
|
|
19230
|
+
else if (hasGoogleToken) {
|
|
19231
|
+
const proxyRootUrl = api.GetBaseUrl() + "proxy/google-tiles/v1/3dtiles/root.json";
|
|
19232
|
+
if (this.disposed) {
|
|
19233
|
+
this.doDispose();
|
|
19234
|
+
return;
|
|
19235
|
+
}
|
|
19236
|
+
this.cTileset = await CESIUM.Cesium3DTileset.fromUrl(proxyRootUrl, {
|
|
19237
|
+
showCreditsOnScreen: true
|
|
19238
|
+
});
|
|
19239
|
+
}
|
|
19240
|
+
else {
|
|
19241
|
+
console.warn("No Google or Cesium Ion token available, so Google Photos tileset will not be rendered.");
|
|
19242
|
+
return;
|
|
19243
|
+
}
|
|
19216
19244
|
}
|
|
19217
19245
|
// Legacy path: fetch real Google key and use createGooglePhotorealistic3DTileset().
|
|
19218
19246
|
// Kill of whenever all API instances are migrated.
|
|
@@ -19240,7 +19268,7 @@ var TilesetGooglePhotosRenderManager;
|
|
|
19240
19268
|
this.doDispose();
|
|
19241
19269
|
return;
|
|
19242
19270
|
}
|
|
19243
|
-
this.cTileset = await ((
|
|
19271
|
+
this.cTileset = await ((_c = CESIUM.createGooglePhotorealistic3DTileset) === null || _c === void 0 ? void 0 : _c.call(CESIUM));
|
|
19244
19272
|
}
|
|
19245
19273
|
if (this.disposed) {
|
|
19246
19274
|
this.doDispose();
|
|
@@ -19268,7 +19296,7 @@ var TilesetGooglePhotosRenderManager;
|
|
|
19268
19296
|
async ReRender(params) {
|
|
19269
19297
|
}
|
|
19270
19298
|
}
|
|
19271
|
-
TilesetGooglePhotosRenderManager.Manager = Manager;
|
|
19299
|
+
TilesetGooglePhotosRenderManager$$1.Manager = Manager;
|
|
19272
19300
|
})(TilesetGooglePhotosRenderManager || (TilesetGooglePhotosRenderManager = {}));
|
|
19273
19301
|
|
|
19274
19302
|
/**
|
|
@@ -36476,7 +36504,7 @@ var StyleUtils;
|
|
|
36476
36504
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
36477
36505
|
})(StyleUtils || (StyleUtils = {}));
|
|
36478
36506
|
|
|
36479
|
-
const VERSION = "6.7.
|
|
36507
|
+
const VERSION = "6.7.7";
|
|
36480
36508
|
/**
|
|
36481
36509
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
36482
36510
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|
|
@@ -36493,5 +36521,5 @@ const getENVIRONMENT = () => {
|
|
|
36493
36521
|
return ENVIRONMENT;
|
|
36494
36522
|
};
|
|
36495
36523
|
|
|
36496
|
-
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, 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, 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 };
|
|
36524
|
+
export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, CesiumAnimatedProperty, 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 };
|
|
36497
36525
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|