bruce-cesium 6.9.8 → 6.9.9
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 +36 -5
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +34 -3
- 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 +33 -2
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
2
|
-
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition,
|
|
3
|
-
import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style,
|
|
2
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, HeightReference, ColorBlendMode, ShadowMode, ClassificationType, Model, ArcType, CornerType, ConstantPositionProperty, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, HorizontalOrigin, VerticalOrigin, SceneTransforms, NearFarScalar, Cartesian2, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CesiumInspector, ClockRange, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, Intersect, CzmlDataSource } from 'cesium';
|
|
3
|
+
import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Carto, Geometry, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, Bounds, Color as Color$1, Api, BruceEvent, EntityCoords, DataLab, DelayQueue, BruceApi, EntityRelation, EntityHistoricData, AccountConcept, RecordChangeFeed, ProgramKey, EntitySource, ProjectViewLegacyTile, ProjectViewTile, Camera, Session, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, EntityRelationType } from 'bruce-models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -37108,7 +37108,9 @@ var EntityRenderEnginePolygon;
|
|
|
37108
37108
|
textureTraceEffective = resolved.effective;
|
|
37109
37109
|
frameArchive = resolved.frameArchive || null;
|
|
37110
37110
|
}
|
|
37111
|
-
const hasFill = fillType === Style.EPolygonFillType.Texture
|
|
37111
|
+
const hasFill = fillType === Style.EPolygonFillType.Texture
|
|
37112
|
+
? Boolean(textureDataUri || frameArchive || cFillColor.alpha > 0)
|
|
37113
|
+
: cFillColor.alpha > 0;
|
|
37112
37114
|
const fillMaterial = textureDataUri
|
|
37113
37115
|
? new ImageMaterialProperty({ image: textureDataUri, transparent: true })
|
|
37114
37116
|
: frameArchive
|
|
@@ -37703,7 +37705,11 @@ function extractClientFileIdFromTextureValue(raw) {
|
|
|
37703
37705
|
*/
|
|
37704
37706
|
async function resolveTexturedFill(params) {
|
|
37705
37707
|
const { api, style, entity, tags } = params;
|
|
37706
|
-
|
|
37708
|
+
const textureValue = style.texture;
|
|
37709
|
+
if (textureValue && !Array.isArray(textureValue)) {
|
|
37710
|
+
return resolveTextureCondition({ api, condition: textureValue });
|
|
37711
|
+
}
|
|
37712
|
+
let textureRows = Array.isArray(textureValue) ? textureValue : [];
|
|
37707
37713
|
textureRows.forEach((row) => {
|
|
37708
37714
|
if (row.type == Calculator.EValueType.Color) {
|
|
37709
37715
|
row.type = Calculator.EValueType.Input;
|
|
@@ -37740,6 +37746,31 @@ async function resolveTexturedFill(params) {
|
|
|
37740
37746
|
}
|
|
37741
37747
|
return { dataUri: await prom, effective: textureTrace.effective };
|
|
37742
37748
|
}
|
|
37749
|
+
async function resolveTextureCondition(params) {
|
|
37750
|
+
const { api, condition } = params;
|
|
37751
|
+
const entityTypeSourceId = condition === null || condition === void 0 ? void 0 : condition["EntityType.Source.ID"];
|
|
37752
|
+
const attribute = condition === null || condition === void 0 ? void 0 : condition.Attribute;
|
|
37753
|
+
if (!api || !entityTypeSourceId || !attribute) {
|
|
37754
|
+
return { dataUri: null, effective: null };
|
|
37755
|
+
}
|
|
37756
|
+
await api.Loading;
|
|
37757
|
+
const clientFile = await ClientFile.FindGeneratedTexture({ api, entityTypeSourceId, attribute });
|
|
37758
|
+
if (!clientFile) {
|
|
37759
|
+
return { dataUri: null, effective: null };
|
|
37760
|
+
}
|
|
37761
|
+
const url = clientFile.URL;
|
|
37762
|
+
const clientFileData = clientFile.Data;
|
|
37763
|
+
if (TextureFrameSeriesAnimator.IsFrameArchiveMetadata(clientFileData)) {
|
|
37764
|
+
return { dataUri: null, effective: null, frameArchive: { url, metadata: clientFileData.generation } };
|
|
37765
|
+
}
|
|
37766
|
+
const cacheKey = "texture-" + url + "-none";
|
|
37767
|
+
let prom = _textureCache.Get(cacheKey);
|
|
37768
|
+
if (!prom) {
|
|
37769
|
+
prom = buildTintedTextureDataUri(url).catch(() => null);
|
|
37770
|
+
_textureCache.Set(cacheKey, prom);
|
|
37771
|
+
}
|
|
37772
|
+
return { dataUri: await prom, effective: null };
|
|
37773
|
+
}
|
|
37743
37774
|
/**
|
|
37744
37775
|
* Fetches an image and, if a color mask is provided, remaps its (assumed grayscale) pixel values
|
|
37745
37776
|
* into a gradient between the mask's minColor/maxColor, preserving source alpha.
|
|
@@ -39081,7 +39112,7 @@ var StyleUtils;
|
|
|
39081
39112
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
39082
39113
|
})(StyleUtils || (StyleUtils = {}));
|
|
39083
39114
|
|
|
39084
|
-
const VERSION = "6.9.
|
|
39115
|
+
const VERSION = "6.9.9";
|
|
39085
39116
|
/**
|
|
39086
39117
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
39087
39118
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|