bruce-cesium 2.6.1 → 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 +13 -5
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +12 -4
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +12 -4
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/package.json +1 -1
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, bOutline, cOutline, outlineWidth, outlineHeight, fillHeight, pos, bColor, cColor, size, heightRef;
|
|
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:
|
|
@@ -2219,11 +2220,17 @@ var EntityRenderEngine;
|
|
|
2219
2220
|
pos = EntityUtils.GetPos({
|
|
2220
2221
|
viewer: params.viewer,
|
|
2221
2222
|
entity: entity,
|
|
2222
|
-
recordHeightRef: HeightReference.
|
|
2223
|
+
recordHeightRef: HeightReference.RELATIVE_TO_GROUND,
|
|
2223
2224
|
returnHeightRef: HeightReference.RELATIVE_TO_GROUND
|
|
2224
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
|
+
}
|
|
2225
2232
|
cEntity = new Entity({
|
|
2226
|
-
position: pos
|
|
2233
|
+
position: pos,
|
|
2227
2234
|
cylinder: {
|
|
2228
2235
|
length: fillHeight,
|
|
2229
2236
|
topRadius: radius,
|
|
@@ -2234,7 +2241,6 @@ var EntityRenderEngine;
|
|
|
2234
2241
|
outlineWidth: outlineWidth
|
|
2235
2242
|
}
|
|
2236
2243
|
});
|
|
2237
|
-
// Here you can add additional logic if you need more customization for the cylinder
|
|
2238
2244
|
}
|
|
2239
2245
|
if (!cEntity) {
|
|
2240
2246
|
bColor = style.color ? Calculator.GetColor(style.color, entity, params.tags) : null;
|
|
@@ -2263,6 +2269,8 @@ var EntityRenderEngine;
|
|
|
2263
2269
|
}),
|
|
2264
2270
|
show: true
|
|
2265
2271
|
});
|
|
2272
|
+
console.log("Created point", cEntity);
|
|
2273
|
+
debugger;
|
|
2266
2274
|
}
|
|
2267
2275
|
if (cEntity) {
|
|
2268
2276
|
cEntity._siblingGraphics = siblings;
|