bruce-cesium 2.6.0 → 2.6.1
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 +20 -52
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +19 -51
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +16 -48
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +2 -2
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +77 -77
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, DelayQueue, BatchedDataGetter, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, EntityRelation, ENVIRONMENT, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, HeadingPitchRoll, Transforms, ColorBlendMode, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle,
|
|
3
|
+
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, EllipsoidGeodesic, EllipsoidTerrainProvider, sampleTerrainMostDetailed, defined, Cesium3DTileset, Model, PolygonPipeline, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumInspector, Matrix4, Matrix3, IonResource, ScreenSpaceEventHandler, ScreenSpaceEventType, ColorMaterialProperty, EasingFunction, GeometryInstance, Ion, BoundingSphere } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -2114,7 +2114,7 @@ var EntityRenderEngine;
|
|
|
2114
2114
|
(function (Point) {
|
|
2115
2115
|
function Render(params) {
|
|
2116
2116
|
return __awaiter(this, void 0, void 0, function () {
|
|
2117
|
-
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, res, e_4, iconScale, disableDepthTest, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, outlineHeight,
|
|
2117
|
+
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, res, e_4, iconScale, disableDepthTest, heightRef, radius, bFill, cFill, outline, bOutline, cOutline, outlineWidth, outlineHeight, fillHeight, pos, bColor, cColor, size, heightRef;
|
|
2118
2118
|
return __generator(this, function (_a) {
|
|
2119
2119
|
switch (_a.label) {
|
|
2120
2120
|
case 0:
|
|
@@ -2211,62 +2211,30 @@ var EntityRenderEngine;
|
|
|
2211
2211
|
bFill = style.CylinderFillColor ? Calculator.GetColor(style.CylinderFillColor, entity, params.tags) : null;
|
|
2212
2212
|
cFill = bFill ? colorToCColor(bFill) : Color.RED;
|
|
2213
2213
|
outline = Boolean(style.CylinderBorderEnabled);
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
bOutline = style.CylinderBorderColor ? Calculator.GetColor(style.CylinderBorderColor, entity, params.tags) : null;
|
|
2219
|
-
cOutline = bOutline ? colorToCColor(bOutline) : Color.BLACK;
|
|
2220
|
-
outlineWidth = EnsureNumber(Calculator.GetNumber(style.CylinderBorderWidth, entity, params.tags), 1);
|
|
2221
|
-
outlineHeight = EnsureNumber(Calculator.GetNumber(style.CylinderBorderExtrusion, entity, params.tags), 0);
|
|
2222
|
-
}
|
|
2214
|
+
bOutline = style.CylinderBorderColor ? Calculator.GetColor(style.CylinderBorderColor, entity, params.tags) : null;
|
|
2215
|
+
cOutline = bOutline ? colorToCColor(bOutline) : Color.BLACK;
|
|
2216
|
+
outlineWidth = EnsureNumber(Calculator.GetNumber(style.CylinderBorderWidth, entity, params.tags), 1);
|
|
2217
|
+
outlineHeight = EnsureNumber(Calculator.GetNumber(style.CylinderBorderExtrusion, entity, params.tags), 0);
|
|
2223
2218
|
fillHeight = EnsureNumber(Calculator.GetNumber(style.CylinderFillExtrusion, entity, params.tags));
|
|
2224
|
-
exHeightRef = undefined;
|
|
2225
|
-
if (fillHeight > 0) {
|
|
2226
|
-
exHeightRef = HeightReference.RELATIVE_TO_GROUND;
|
|
2227
|
-
}
|
|
2228
2219
|
pos = EntityUtils.GetPos({
|
|
2229
2220
|
viewer: params.viewer,
|
|
2230
2221
|
entity: entity,
|
|
2231
2222
|
recordHeightRef: HeightReference.CLAMP_TO_GROUND,
|
|
2232
|
-
returnHeightRef: HeightReference.
|
|
2223
|
+
returnHeightRef: HeightReference.RELATIVE_TO_GROUND
|
|
2233
2224
|
});
|
|
2234
2225
|
cEntity = new Entity({
|
|
2235
|
-
ellipse: {
|
|
2236
|
-
semiMajorAxis: radius,
|
|
2237
|
-
semiMinorAxis: radius,
|
|
2238
|
-
material: cFill,
|
|
2239
|
-
outlineWidth: null,
|
|
2240
|
-
extrudedHeight: fillHeight,
|
|
2241
|
-
heightReference: HeightReference.CLAMP_TO_GROUND,
|
|
2242
|
-
extrudedHeightReference: exHeightRef,
|
|
2243
|
-
zIndex: 1,
|
|
2244
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2245
|
-
},
|
|
2246
2226
|
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2227
|
+
cylinder: {
|
|
2228
|
+
length: fillHeight,
|
|
2229
|
+
topRadius: radius,
|
|
2230
|
+
bottomRadius: radius,
|
|
2231
|
+
material: cFill,
|
|
2232
|
+
outline: outline,
|
|
2233
|
+
outlineColor: cOutline,
|
|
2234
|
+
outlineWidth: outlineWidth
|
|
2254
2235
|
}
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
semiMajorAxis: radius + outlineWidth,
|
|
2258
|
-
semiMinorAxis: radius + outlineWidth,
|
|
2259
|
-
material: cOutline,
|
|
2260
|
-
outlineWidth: undefined,
|
|
2261
|
-
extrudedHeight: outlineHeight,
|
|
2262
|
-
heightReference: HeightReference.CLAMP_TO_GROUND,
|
|
2263
|
-
extrudedHeightReference: exHeightRef,
|
|
2264
|
-
zIndex: 2,
|
|
2265
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2266
|
-
},
|
|
2267
|
-
position: pos === null || pos === void 0 ? void 0 : pos.clone()
|
|
2268
|
-
}));
|
|
2269
|
-
}
|
|
2236
|
+
});
|
|
2237
|
+
// Here you can add additional logic if you need more customization for the cylinder
|
|
2270
2238
|
}
|
|
2271
2239
|
if (!cEntity) {
|
|
2272
2240
|
bColor = style.color ? Calculator.GetColor(style.color, entity, params.tags) : null;
|
|
@@ -7206,7 +7174,7 @@ var TilesetRenderEngine;
|
|
|
7206
7174
|
* The maximum memory in MB that can be used by all tilesets.
|
|
7207
7175
|
* This is distributed evenly between all loaded tilesets.
|
|
7208
7176
|
*/
|
|
7209
|
-
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024
|
|
7177
|
+
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024;
|
|
7210
7178
|
/**
|
|
7211
7179
|
* Watches tilesets in the viewer.
|
|
7212
7180
|
* This will regulate their max memory param.
|
|
@@ -7223,7 +7191,7 @@ var TilesetRenderEngine;
|
|
|
7223
7191
|
// We'll need to allow user to change this somehow.
|
|
7224
7192
|
var maxMemory = TilesetRenderEngine.MAX_TILESET_MEMORY;
|
|
7225
7193
|
// Minimum memory in MB per tileset.
|
|
7226
|
-
var minMemory =
|
|
7194
|
+
var minMemory = 80;
|
|
7227
7195
|
var totalPerTileset = Math.max(this.watched.length ? maxMemory / this.watched.length : maxMemory, minMemory);
|
|
7228
7196
|
this.watched.forEach(function (x) {
|
|
7229
7197
|
x.maximumMemoryUsage = totalPerTileset;
|
|
@@ -15020,7 +14988,7 @@ var ViewerUtils;
|
|
|
15020
14988
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
15021
14989
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
15022
14990
|
|
|
15023
|
-
var VERSION$1 = "2.
|
|
14991
|
+
var VERSION$1 = "2.5.9";
|
|
15024
14992
|
|
|
15025
14993
|
export { VERSION$1 as VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
|
|
15026
14994
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|