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.umd.js
CHANGED
|
@@ -1860,6 +1860,7 @@
|
|
|
1860
1860
|
return __generator(this, function (_j) {
|
|
1861
1861
|
switch (_j.label) {
|
|
1862
1862
|
case 0:
|
|
1863
|
+
console.log("Rendering entities", params);
|
|
1863
1864
|
groupRenderParams = {
|
|
1864
1865
|
apiGetter: params.apiGetter,
|
|
1865
1866
|
viewer: params.viewer,
|
|
@@ -2111,7 +2112,7 @@
|
|
|
2111
2112
|
(function (Point) {
|
|
2112
2113
|
function Render(params) {
|
|
2113
2114
|
return __awaiter(this, void 0, void 0, function () {
|
|
2114
|
-
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, res, e_4, iconScale, disableDepthTest, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, outlineHeight,
|
|
2115
|
+
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;
|
|
2115
2116
|
return __generator(this, function (_a) {
|
|
2116
2117
|
switch (_a.label) {
|
|
2117
2118
|
case 0:
|
|
@@ -2208,62 +2209,35 @@
|
|
|
2208
2209
|
bFill = style.CylinderFillColor ? bruceModels.Calculator.GetColor(style.CylinderFillColor, entity, params.tags) : null;
|
|
2209
2210
|
cFill = bFill ? colorToCColor(bFill) : Cesium.Color.RED;
|
|
2210
2211
|
outline = Boolean(style.CylinderBorderEnabled);
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
bOutline = style.CylinderBorderColor ? bruceModels.Calculator.GetColor(style.CylinderBorderColor, entity, params.tags) : null;
|
|
2216
|
-
cOutline = bOutline ? colorToCColor(bOutline) : Cesium.Color.BLACK;
|
|
2217
|
-
outlineWidth = EnsureNumber(bruceModels.Calculator.GetNumber(style.CylinderBorderWidth, entity, params.tags), 1);
|
|
2218
|
-
outlineHeight = EnsureNumber(bruceModels.Calculator.GetNumber(style.CylinderBorderExtrusion, entity, params.tags), 0);
|
|
2219
|
-
}
|
|
2212
|
+
bOutline = style.CylinderBorderColor ? bruceModels.Calculator.GetColor(style.CylinderBorderColor, entity, params.tags) : null;
|
|
2213
|
+
cOutline = bOutline ? colorToCColor(bOutline) : Cesium.Color.BLACK;
|
|
2214
|
+
outlineWidth = EnsureNumber(bruceModels.Calculator.GetNumber(style.CylinderBorderWidth, entity, params.tags), 1);
|
|
2215
|
+
outlineHeight = EnsureNumber(bruceModels.Calculator.GetNumber(style.CylinderBorderExtrusion, entity, params.tags), 0);
|
|
2220
2216
|
fillHeight = EnsureNumber(bruceModels.Calculator.GetNumber(style.CylinderFillExtrusion, entity, params.tags));
|
|
2221
|
-
exHeightRef = undefined;
|
|
2222
|
-
if (fillHeight > 0) {
|
|
2223
|
-
exHeightRef = Cesium.HeightReference.RELATIVE_TO_GROUND;
|
|
2224
|
-
}
|
|
2225
2217
|
pos = exports.EntityUtils.GetPos({
|
|
2226
2218
|
viewer: params.viewer,
|
|
2227
2219
|
entity: entity,
|
|
2228
|
-
recordHeightRef: Cesium.HeightReference.
|
|
2229
|
-
returnHeightRef: Cesium.HeightReference.
|
|
2220
|
+
recordHeightRef: Cesium.HeightReference.RELATIVE_TO_GROUND,
|
|
2221
|
+
returnHeightRef: Cesium.HeightReference.RELATIVE_TO_GROUND
|
|
2230
2222
|
});
|
|
2223
|
+
// Adjust the position to consider half the height of the cylinder
|
|
2224
|
+
if (pos) {
|
|
2225
|
+
cartographicPosition = Cesium.Cartographic.fromCartesian(pos);
|
|
2226
|
+
cartographicPosition.height += fillHeight / 2;
|
|
2227
|
+
pos = Cesium.Cartographic.toCartesian(cartographicPosition);
|
|
2228
|
+
}
|
|
2231
2229
|
cEntity = new Cesium.Entity({
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2230
|
+
position: pos,
|
|
2231
|
+
cylinder: {
|
|
2232
|
+
length: fillHeight,
|
|
2233
|
+
topRadius: radius,
|
|
2234
|
+
bottomRadius: radius,
|
|
2235
2235
|
material: cFill,
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
extrudedHeightReference: exHeightRef,
|
|
2240
|
-
zIndex: 1,
|
|
2241
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2242
|
-
},
|
|
2243
|
-
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2244
|
-
show: true
|
|
2245
|
-
});
|
|
2246
|
-
if (outline && outlineWidth > 0) {
|
|
2247
|
-
if (!exHeightRef && outlineHeight > 0) {
|
|
2248
|
-
exHeightRef = Cesium.HeightReference.RELATIVE_TO_GROUND;
|
|
2249
|
-
// We need height reference to match between rings.
|
|
2250
|
-
cEntity.ellipse.extrudedHeightReference = exHeightRef;
|
|
2236
|
+
outline: outline,
|
|
2237
|
+
outlineColor: cOutline,
|
|
2238
|
+
outlineWidth: outlineWidth
|
|
2251
2239
|
}
|
|
2252
|
-
|
|
2253
|
-
ellipse: {
|
|
2254
|
-
semiMajorAxis: radius + outlineWidth,
|
|
2255
|
-
semiMinorAxis: radius + outlineWidth,
|
|
2256
|
-
material: cOutline,
|
|
2257
|
-
outlineWidth: undefined,
|
|
2258
|
-
extrudedHeight: outlineHeight,
|
|
2259
|
-
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
2260
|
-
extrudedHeightReference: exHeightRef,
|
|
2261
|
-
zIndex: 2,
|
|
2262
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2263
|
-
},
|
|
2264
|
-
position: pos === null || pos === void 0 ? void 0 : pos.clone()
|
|
2265
|
-
}));
|
|
2266
|
-
}
|
|
2240
|
+
});
|
|
2267
2241
|
}
|
|
2268
2242
|
if (!cEntity) {
|
|
2269
2243
|
bColor = style.color ? bruceModels.Calculator.GetColor(style.color, entity, params.tags) : null;
|
|
@@ -2292,6 +2266,8 @@
|
|
|
2292
2266
|
}),
|
|
2293
2267
|
show: true
|
|
2294
2268
|
});
|
|
2269
|
+
console.log("Created point", cEntity);
|
|
2270
|
+
debugger;
|
|
2295
2271
|
}
|
|
2296
2272
|
if (cEntity) {
|
|
2297
2273
|
cEntity._siblingGraphics = siblings;
|
|
@@ -7177,7 +7153,7 @@
|
|
|
7177
7153
|
* The maximum memory in MB that can be used by all tilesets.
|
|
7178
7154
|
* This is distributed evenly between all loaded tilesets.
|
|
7179
7155
|
*/
|
|
7180
|
-
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024
|
|
7156
|
+
TilesetRenderEngine.MAX_TILESET_MEMORY = 1024;
|
|
7181
7157
|
/**
|
|
7182
7158
|
* Watches tilesets in the viewer.
|
|
7183
7159
|
* This will regulate their max memory param.
|
|
@@ -7194,7 +7170,7 @@
|
|
|
7194
7170
|
// We'll need to allow user to change this somehow.
|
|
7195
7171
|
var maxMemory = TilesetRenderEngine.MAX_TILESET_MEMORY;
|
|
7196
7172
|
// Minimum memory in MB per tileset.
|
|
7197
|
-
var minMemory =
|
|
7173
|
+
var minMemory = 80;
|
|
7198
7174
|
var totalPerTileset = Math.max(this.watched.length ? maxMemory / this.watched.length : maxMemory, minMemory);
|
|
7199
7175
|
this.watched.forEach(function (x) {
|
|
7200
7176
|
x.maximumMemoryUsage = totalPerTileset;
|
|
@@ -14966,7 +14942,7 @@
|
|
|
14966
14942
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
14967
14943
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
14968
14944
|
|
|
14969
|
-
var VERSION$1 = "2.
|
|
14945
|
+
var VERSION$1 = "2.5.9";
|
|
14970
14946
|
|
|
14971
14947
|
exports.VERSION = VERSION$1;
|
|
14972
14948
|
exports.CesiumViewMonitor = CesiumViewMonitor;
|