bruce-cesium 2.6.0 → 2.6.2
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 +29 -53
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +28 -52
- 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 +25 -49
- 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,
|
|
3
|
+
import { Cartographic, Cartesian3, SceneMode, Math as Math$1, Cartesian2, CallbackProperty, Color, Rectangle, JulianDate, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, KmlDataSource, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, OrthographicFrustum, ColorMaterialProperty, Matrix3, Matrix4, EasingFunction, GeometryInstance, Cesium3DTileset, IonResource, ScreenSpaceEventHandler, ScreenSpaceEventType, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, Model, CesiumInspector, Ion, BoundingSphere } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -1863,6 +1863,7 @@ var EntityRenderEngine;
|
|
|
1863
1863
|
return __generator(this, function (_j) {
|
|
1864
1864
|
switch (_j.label) {
|
|
1865
1865
|
case 0:
|
|
1866
|
+
console.log("Rendering entities", params);
|
|
1866
1867
|
groupRenderParams = {
|
|
1867
1868
|
apiGetter: params.apiGetter,
|
|
1868
1869
|
viewer: params.viewer,
|
|
@@ -2114,7 +2115,7 @@ var EntityRenderEngine;
|
|
|
2114
2115
|
(function (Point) {
|
|
2115
2116
|
function Render(params) {
|
|
2116
2117
|
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,
|
|
2118
|
+
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, cartographicPosition, bColor, cColor, size, heightRef;
|
|
2118
2119
|
return __generator(this, function (_a) {
|
|
2119
2120
|
switch (_a.label) {
|
|
2120
2121
|
case 0:
|
|
@@ -2211,62 +2212,35 @@ var EntityRenderEngine;
|
|
|
2211
2212
|
bFill = style.CylinderFillColor ? Calculator.GetColor(style.CylinderFillColor, entity, params.tags) : null;
|
|
2212
2213
|
cFill = bFill ? colorToCColor(bFill) : Color.RED;
|
|
2213
2214
|
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
|
-
}
|
|
2215
|
+
bOutline = style.CylinderBorderColor ? Calculator.GetColor(style.CylinderBorderColor, entity, params.tags) : null;
|
|
2216
|
+
cOutline = bOutline ? colorToCColor(bOutline) : Color.BLACK;
|
|
2217
|
+
outlineWidth = EnsureNumber(Calculator.GetNumber(style.CylinderBorderWidth, entity, params.tags), 1);
|
|
2218
|
+
outlineHeight = EnsureNumber(Calculator.GetNumber(style.CylinderBorderExtrusion, entity, params.tags), 0);
|
|
2223
2219
|
fillHeight = EnsureNumber(Calculator.GetNumber(style.CylinderFillExtrusion, entity, params.tags));
|
|
2224
|
-
exHeightRef = undefined;
|
|
2225
|
-
if (fillHeight > 0) {
|
|
2226
|
-
exHeightRef = HeightReference.RELATIVE_TO_GROUND;
|
|
2227
|
-
}
|
|
2228
2220
|
pos = EntityUtils.GetPos({
|
|
2229
2221
|
viewer: params.viewer,
|
|
2230
2222
|
entity: entity,
|
|
2231
|
-
recordHeightRef: HeightReference.
|
|
2232
|
-
returnHeightRef: HeightReference.
|
|
2223
|
+
recordHeightRef: HeightReference.RELATIVE_TO_GROUND,
|
|
2224
|
+
returnHeightRef: HeightReference.RELATIVE_TO_GROUND
|
|
2233
2225
|
});
|
|
2226
|
+
// Adjust the position to consider half the height of the cylinder
|
|
2227
|
+
if (pos) {
|
|
2228
|
+
cartographicPosition = Cartographic.fromCartesian(pos);
|
|
2229
|
+
cartographicPosition.height += fillHeight / 2;
|
|
2230
|
+
pos = Cartographic.toCartesian(cartographicPosition);
|
|
2231
|
+
}
|
|
2234
2232
|
cEntity = new Entity({
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2233
|
+
position: pos,
|
|
2234
|
+
cylinder: {
|
|
2235
|
+
length: fillHeight,
|
|
2236
|
+
topRadius: radius,
|
|
2237
|
+
bottomRadius: radius,
|
|
2238
2238
|
material: cFill,
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
extrudedHeightReference: exHeightRef,
|
|
2243
|
-
zIndex: 1,
|
|
2244
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2245
|
-
},
|
|
2246
|
-
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2247
|
-
show: true
|
|
2248
|
-
});
|
|
2249
|
-
if (outline && outlineWidth > 0) {
|
|
2250
|
-
if (!exHeightRef && outlineHeight > 0) {
|
|
2251
|
-
exHeightRef = HeightReference.RELATIVE_TO_GROUND;
|
|
2252
|
-
// We need height reference to match between rings.
|
|
2253
|
-
cEntity.ellipse.extrudedHeightReference = exHeightRef;
|
|
2239
|
+
outline: outline,
|
|
2240
|
+
outlineColor: cOutline,
|
|
2241
|
+
outlineWidth: outlineWidth
|
|
2254
2242
|
}
|
|
2255
|
-
|
|
2256
|
-
ellipse: {
|
|
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
|
-
}
|
|
2243
|
+
});
|
|
2270
2244
|
}
|
|
2271
2245
|
if (!cEntity) {
|
|
2272
2246
|
bColor = style.color ? Calculator.GetColor(style.color, entity, params.tags) : null;
|
|
@@ -2295,6 +2269,8 @@ var EntityRenderEngine;
|
|
|
2295
2269
|
}),
|
|
2296
2270
|
show: true
|
|
2297
2271
|
});
|
|
2272
|
+
console.log("Created point", cEntity);
|
|
2273
|
+
debugger;
|
|
2298
2274
|
}
|
|
2299
2275
|
if (cEntity) {
|
|
2300
2276
|
cEntity._siblingGraphics = siblings;
|
|
@@ -7206,7 +7182,7 @@ var TilesetRenderEngine;
|
|
|
7206
7182
|
* The maximum memory in MB that can be used by all tilesets.
|
|
7207
7183
|
* This is distributed evenly between all loaded tilesets.
|
|
7208
7184
|
*/
|
|
7209
|
-
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024
|
|
7185
|
+
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024;
|
|
7210
7186
|
/**
|
|
7211
7187
|
* Watches tilesets in the viewer.
|
|
7212
7188
|
* This will regulate their max memory param.
|
|
@@ -7223,7 +7199,7 @@ var TilesetRenderEngine;
|
|
|
7223
7199
|
// We'll need to allow user to change this somehow.
|
|
7224
7200
|
var maxMemory = TilesetRenderEngine.MAX_TILESET_MEMORY;
|
|
7225
7201
|
// Minimum memory in MB per tileset.
|
|
7226
|
-
var minMemory =
|
|
7202
|
+
var minMemory = 80;
|
|
7227
7203
|
var totalPerTileset = Math.max(this.watched.length ? maxMemory / this.watched.length : maxMemory, minMemory);
|
|
7228
7204
|
this.watched.forEach(function (x) {
|
|
7229
7205
|
x.maximumMemoryUsage = totalPerTileset;
|
|
@@ -15020,7 +14996,7 @@ var ViewerUtils;
|
|
|
15020
14996
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
15021
14997
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
15022
14998
|
|
|
15023
|
-
var VERSION$1 = "2.
|
|
14999
|
+
var VERSION$1 = "2.5.9";
|
|
15024
15000
|
|
|
15025
15001
|
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
15002
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|