bruce-cesium 6.9.8 → 7.0.0
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 +50 -6
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -4
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js +44 -2
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +1 -0
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/texture-frame-series-animator.js +2 -1
- package/dist/lib/rendering/texture-frame-series-animator.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/entity-render-engine-polygon.d.ts +4 -0
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -36790,7 +36790,8 @@
|
|
|
36790
36790
|
if (this.disposed) {
|
|
36791
36791
|
return;
|
|
36792
36792
|
}
|
|
36793
|
-
this.
|
|
36793
|
+
const idx = this.findFrameIndex(currentTime);
|
|
36794
|
+
this.swapToFrame(idx);
|
|
36794
36795
|
}
|
|
36795
36796
|
// Binary-search the frame whose timestamp is <= currentTime.
|
|
36796
36797
|
findFrameIndex(currentTime) {
|
|
@@ -37001,7 +37002,9 @@
|
|
|
37001
37002
|
textureTraceEffective = resolved.effective;
|
|
37002
37003
|
frameArchive = resolved.frameArchive || null;
|
|
37003
37004
|
}
|
|
37004
|
-
const hasFill = fillType === BModels.Style.EPolygonFillType.Texture
|
|
37005
|
+
const hasFill = fillType === BModels.Style.EPolygonFillType.Texture
|
|
37006
|
+
? Boolean(textureDataUri || frameArchive || cFillColor.alpha > 0)
|
|
37007
|
+
: cFillColor.alpha > 0;
|
|
37005
37008
|
const fillMaterial = textureDataUri
|
|
37006
37009
|
? new Cesium.ImageMaterialProperty({ image: textureDataUri, transparent: true })
|
|
37007
37010
|
: frameArchive
|
|
@@ -37406,6 +37409,17 @@
|
|
|
37406
37409
|
return cEntities;
|
|
37407
37410
|
}
|
|
37408
37411
|
EntityRenderEnginePolygon.RenderGroup = RenderGroup;
|
|
37412
|
+
/**
|
|
37413
|
+
* Disposes a cEntity's TextureFrameSeriesAnimator.Animator (if any).
|
|
37414
|
+
*/
|
|
37415
|
+
function DisposeTextureFrameSeriesAnimator(cEntity) {
|
|
37416
|
+
const existing = cEntity === null || cEntity === void 0 ? void 0 : cEntity[TEXTURE_FRAME_SERIES_ANIMATOR_KEY];
|
|
37417
|
+
if (existing && !existing.IsDisposed()) {
|
|
37418
|
+
existing.Dispose();
|
|
37419
|
+
cEntity[TEXTURE_FRAME_SERIES_ANIMATOR_KEY] = null;
|
|
37420
|
+
}
|
|
37421
|
+
}
|
|
37422
|
+
EntityRenderEnginePolygon.DisposeTextureFrameSeriesAnimator = DisposeTextureFrameSeriesAnimator;
|
|
37409
37423
|
})(exports.EntityRenderEnginePolygon || (exports.EntityRenderEnginePolygon = {}));
|
|
37410
37424
|
async function getName$3(api, entity) {
|
|
37411
37425
|
try {
|
|
@@ -37596,7 +37610,11 @@
|
|
|
37596
37610
|
*/
|
|
37597
37611
|
async function resolveTexturedFill(params) {
|
|
37598
37612
|
const { api, style, entity, tags } = params;
|
|
37599
|
-
|
|
37613
|
+
const textureValue = style.texture;
|
|
37614
|
+
if (textureValue && !Array.isArray(textureValue)) {
|
|
37615
|
+
return resolveTextureCondition({ api, condition: textureValue });
|
|
37616
|
+
}
|
|
37617
|
+
let textureRows = Array.isArray(textureValue) ? textureValue : [];
|
|
37600
37618
|
textureRows.forEach((row) => {
|
|
37601
37619
|
if (row.type == BModels.Calculator.EValueType.Color) {
|
|
37602
37620
|
row.type = BModels.Calculator.EValueType.Input;
|
|
@@ -37633,6 +37651,31 @@
|
|
|
37633
37651
|
}
|
|
37634
37652
|
return { dataUri: await prom, effective: textureTrace.effective };
|
|
37635
37653
|
}
|
|
37654
|
+
async function resolveTextureCondition(params) {
|
|
37655
|
+
const { api, condition } = params;
|
|
37656
|
+
const entityTypeSourceId = condition === null || condition === void 0 ? void 0 : condition["EntityType.Source.ID"];
|
|
37657
|
+
const attribute = condition === null || condition === void 0 ? void 0 : condition.Attribute;
|
|
37658
|
+
if (!api || !entityTypeSourceId || !attribute) {
|
|
37659
|
+
return { dataUri: null, effective: null };
|
|
37660
|
+
}
|
|
37661
|
+
await api.Loading;
|
|
37662
|
+
const clientFile = await BModels.ClientFile.FindGeneratedTexture({ api, entityTypeSourceId, attribute });
|
|
37663
|
+
if (!clientFile) {
|
|
37664
|
+
return { dataUri: null, effective: null };
|
|
37665
|
+
}
|
|
37666
|
+
const url = clientFile.URL;
|
|
37667
|
+
const clientFileData = clientFile.Data;
|
|
37668
|
+
if (TextureFrameSeriesAnimator.IsFrameArchiveMetadata(clientFileData)) {
|
|
37669
|
+
return { dataUri: null, effective: null, frameArchive: { url, metadata: clientFileData.generation } };
|
|
37670
|
+
}
|
|
37671
|
+
const cacheKey = "texture-" + url + "-none";
|
|
37672
|
+
let prom = _textureCache.Get(cacheKey);
|
|
37673
|
+
if (!prom) {
|
|
37674
|
+
prom = buildTintedTextureDataUri(url).catch(() => null);
|
|
37675
|
+
_textureCache.Set(cacheKey, prom);
|
|
37676
|
+
}
|
|
37677
|
+
return { dataUri: await prom, effective: null };
|
|
37678
|
+
}
|
|
37636
37679
|
/**
|
|
37637
37680
|
* Fetches an image and, if a color mask is provided, remaps its (assumed grayscale) pixel values
|
|
37638
37681
|
* into a gradient between the mask's minColor/maxColor, preserving source alpha.
|
|
@@ -38278,6 +38321,7 @@
|
|
|
38278
38321
|
entity._dispose();
|
|
38279
38322
|
entity._dispose = null;
|
|
38280
38323
|
}
|
|
38324
|
+
exports.EntityRenderEnginePolygon.DisposeTextureFrameSeriesAnimator(entity);
|
|
38281
38325
|
if (entity._parentEntity && !ignoreParent) {
|
|
38282
38326
|
doRemove({
|
|
38283
38327
|
viewer,
|
|
@@ -38959,7 +39003,7 @@
|
|
|
38959
39003
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
38960
39004
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
38961
39005
|
|
|
38962
|
-
const VERSION = "
|
|
39006
|
+
const VERSION = "7.0.0";
|
|
38963
39007
|
/**
|
|
38964
39008
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
38965
39009
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|