bruce-cesium 4.4.8 → 4.5.0
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 +10 -51
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +7 -49
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js +8 -49
- package/dist/lib/rendering/entity-render-engine-polyline.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/entity-render-engine-polyline.d.ts +0 -1
- package/dist/types/rendering/entity-render-engine.d.ts +5 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile,
|
|
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, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic,
|
|
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, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, 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, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, BoundingSphere, GeometryInstance, CesiumInspector, ClockRange, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, Quaternion, CzmlDataSource, Intersect } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6883,7 +6883,7 @@ var EntityRenderEnginePolyline;
|
|
|
6883
6883
|
if (style.smoothen && style.smoothen > 2) {
|
|
6884
6884
|
// Keeping reference to original points for editing tools.
|
|
6885
6885
|
orgPosses = posses.map(function (x) { return x.clone ? x.clone() : new Cartesian3(x.x, x.y, x.z); });
|
|
6886
|
-
var smoothed =
|
|
6886
|
+
var smoothed = DrawingUtils.SmoothPoints(posses, style.smoothen, false);
|
|
6887
6887
|
if (smoothed.find(function (x) { return !Cartes.ValidateCartes3(x); })) {
|
|
6888
6888
|
console.error("Polyline.Render: Smoothening failed. Invalid Cartesian3 found. Defaulting to original points.");
|
|
6889
6889
|
orgPosses = null;
|
|
@@ -7048,6 +7048,11 @@ var EntityRenderEnginePolyline;
|
|
|
7048
7048
|
// Used when we run a smooth.
|
|
7049
7049
|
if (cEntity === null || cEntity === void 0 ? void 0 : cEntity.polyline) {
|
|
7050
7050
|
cEntity.polyline._orgPosses = orgPosses;
|
|
7051
|
+
cEntity.polyline._smoothen = style.smoothen;
|
|
7052
|
+
}
|
|
7053
|
+
else if (cEntity === null || cEntity === void 0 ? void 0 : cEntity.corridor) {
|
|
7054
|
+
cEntity.corridor._orgPosses = orgPosses;
|
|
7055
|
+
cEntity.corridor._smoothen = style.smoothen;
|
|
7051
7056
|
}
|
|
7052
7057
|
return cEntity;
|
|
7053
7058
|
}
|
|
@@ -7254,52 +7259,6 @@ function getHeightRef$2(style, defaultStyle) {
|
|
|
7254
7259
|
}
|
|
7255
7260
|
return heightRef;
|
|
7256
7261
|
}
|
|
7257
|
-
function smoothenPoints(points, multiplier, closed) {
|
|
7258
|
-
if (points.length < 4 || multiplier < 2) {
|
|
7259
|
-
return points;
|
|
7260
|
-
}
|
|
7261
|
-
if (!closed) {
|
|
7262
|
-
points.unshift(Cartesian3.subtract(points[0], points[1], new Cartesian3()));
|
|
7263
|
-
points.push(Cartesian3.subtract(points[points.length - 1], points[points.length - 2], new Cartesian3()));
|
|
7264
|
-
}
|
|
7265
|
-
else {
|
|
7266
|
-
points.unshift(points[points.length - 1]);
|
|
7267
|
-
points.unshift(points[points.length - 2]);
|
|
7268
|
-
points.push(points[2]);
|
|
7269
|
-
}
|
|
7270
|
-
var splinePoints = [];
|
|
7271
|
-
var _loop_1 = function (i) {
|
|
7272
|
-
var _a = [0, 1, 2, 3].map(function (n) { return points[i + n]; }), P0 = _a[0], P1 = _a[1], P2 = _a[2], P3 = _a[3];
|
|
7273
|
-
for (var j = 0; j <= multiplier; j++) {
|
|
7274
|
-
splinePoints.push(catmullRom$1(P0, P1, P2, P3, j / multiplier));
|
|
7275
|
-
}
|
|
7276
|
-
};
|
|
7277
|
-
for (var i = 0; i < points.length - 3; i++) {
|
|
7278
|
-
_loop_1(i);
|
|
7279
|
-
}
|
|
7280
|
-
return splinePoints;
|
|
7281
|
-
}
|
|
7282
|
-
function catmullRom$1(p0, p1, p2, p3, t) {
|
|
7283
|
-
var t0 = 0;
|
|
7284
|
-
var t1 = getT$1(t0, 0.5, p0, p1);
|
|
7285
|
-
var t2 = getT$1(t1, 0.5, p1, p2);
|
|
7286
|
-
var t3 = getT$1(t2, 0.5, p2, p3);
|
|
7287
|
-
t = Math$1.lerp(t1, t2, t);
|
|
7288
|
-
var _a = [function (l, r) { return Cartesian3.add(l, r, new Cartesian3()); }, function (l, r) { return Cartesian3.multiplyByScalar(l, r, new Cartesian3()); }], add = _a[0], mul = _a[1];
|
|
7289
|
-
var A1 = add(mul(p0, (t1 - t) / (t1 - t0)), mul(p1, (t - t0) / (t1 - t0)));
|
|
7290
|
-
var A2 = add(mul(p1, (t2 - t) / (t2 - t1)), mul(p2, (t - t1) / (t2 - t1)));
|
|
7291
|
-
var A3 = add(mul(p2, (t3 - t) / (t3 - t2)), mul(p3, (t - t2) / (t3 - t2)));
|
|
7292
|
-
var B1 = add(mul(A1, (t2 - t) / (t2 - t0)), mul(A2, (t - t0) / (t2 - t0)));
|
|
7293
|
-
var B2 = add(mul(A2, (t3 - t) / (t3 - t1)), mul(A3, (t - t1) / (t3 - t1)));
|
|
7294
|
-
var C = add(mul(B1, (t2 - t) / (t2 - t1)), mul(B2, (t - t1) / (t2 - t1)));
|
|
7295
|
-
return C;
|
|
7296
|
-
}
|
|
7297
|
-
function getT$1(t, alpha, p0, p1) {
|
|
7298
|
-
var d = Cartesian3.subtract(p1, p0, new Cartesian3());
|
|
7299
|
-
var a = Cartesian3.dot(d, d);
|
|
7300
|
-
var b = Math.pow(a, alpha * 0.5);
|
|
7301
|
-
return b + t;
|
|
7302
|
-
}
|
|
7303
7262
|
|
|
7304
7263
|
var EntityRenderEnginePolygon;
|
|
7305
7264
|
(function (EntityRenderEnginePolygon) {
|
|
@@ -27281,7 +27240,7 @@ var ViewerUtils;
|
|
|
27281
27240
|
ViewerUtils.AssertIonToken = AssertIonToken;
|
|
27282
27241
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
27283
27242
|
|
|
27284
|
-
var VERSION = "4.
|
|
27243
|
+
var VERSION = "4.5.0";
|
|
27285
27244
|
|
|
27286
|
-
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline,
|
|
27245
|
+
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, 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, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
27287
27246
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|