bruce-cesium 2.5.9 → 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 +17 -49
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +16 -48
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +16 -48
- package/dist/lib/rendering/entity-render-engine.js.map +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, Primitive, Cesium3DTileFeature, SceneMode, HeadingPitchRange, Cesium3DTileStyle, KmlDataSource,
|
|
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;
|