bruce-cesium 7.2.3 → 7.2.4

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.
@@ -1,6 +1,6 @@
1
1
  import * as Cesium from 'cesium';
2
- import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, ShaderSource, Ellipsoid, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, Cartesian2, HeightReference, ColorBlendMode, ShadowMode, ClassificationType, Model, DistanceDisplayCondition, ArcType, CornerType, ConstantPositionProperty, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, HorizontalOrigin, VerticalOrigin, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, Intersect, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CustomDataSource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, GeometryInstance, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
- import { Cartes, Entity as Entity$1, ProjectViewTile, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Carto, Geometry as Geometry$1, Bounds, Color as Color$1, Api, BruceEvent, EntityCoords, MenuItem, Tileset, ProjectView, ProjectViewBookmark, ZoomControl, DelayQueue, DataLab, AccountConcept, RecordChangeFeed, BruceApi, EntityRelation, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, UrlUtils, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, ProjectViewBookmarkGroup, EntityRelationType, EntityHistoricData } from 'bruce-models';
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, ShaderSource, Ellipsoid, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, Cartesian2, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, ArcType, CornerType, Rectangle, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, SceneMode, HeadingPitchRange, Ion, IonResource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, Cesium3DTileset, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Intersect, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CustomDataSource, GeometryInstance, PolygonPipeline, CesiumInspector, defined, ClockRange, DynamicEnvironmentMapManager, EllipsoidGeodesic, sampleTerrainMostDetailed, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
+ import { Cartes, Entity as Entity$1, ProjectViewTile, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Api, Bounds, Color as Color$1, Geometry as Geometry$1, Carto, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, DataLab, DelayQueue, BruceApi, AccountConcept, RecordChangeFeed, EntityRelation, Camera, ProgramKey, ProjectViewLegacyTile, EntitySource, Account, AccountLimits, Session, UrlUtils, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, ProjectViewBookmarkGroup, EntityRelationType, EntityHistoricData } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -40562,6 +40562,14 @@ var TextureFrameSeriesAnimator;
40562
40562
  return { scale, offset: SourceValueMin - ValueMin * scale };
40563
40563
  }
40564
40564
  TextureFrameSeriesAnimator.SourceMap = SourceMap;
40565
+ /**
40566
+ * Whether anything was applied to the values on the way out of the source.
40567
+ * @param metadata the archive's Data.generation
40568
+ */
40569
+ function IsTransformed(metadata) {
40570
+ return Boolean(metadata && metadata.Transform);
40571
+ }
40572
+ TextureFrameSeriesAnimator.IsTransformed = IsTransformed;
40565
40573
  /**
40566
40574
  * A delivered value in the source's own terms, or unchanged when it cannot be turned back.
40567
40575
  * @param map from SourceMap(), null when the archive does not say enough
@@ -41537,6 +41545,9 @@ var TextureValueLabels;
41537
41545
  : TextureFrameSeriesAnimator.SourceMap(metadata);
41538
41546
  const inSource = (value) => TextureFrameSeriesAnimator.ToSource(toSource, value);
41539
41547
  const reading = { value: inSource(lo + normalised * (hi - lo)) };
41548
+ if (TextureFrameSeriesAnimator.IsTransformed(metadata)) {
41549
+ return reading;
41550
+ }
41540
41551
  const eLo = metadata && metadata.ExtremesValueMin;
41541
41552
  const eHi = metadata && metadata.ExtremesValueMax;
41542
41553
  if (typeof eLo === "number" && typeof eHi === "number") {
@@ -42021,10 +42032,11 @@ var TextureValueLabels;
42021
42032
  sample.push(valueLine("-000.00", LabelUnits(this.metadata)));
42022
42033
  }
42023
42034
  const range = [];
42024
- if (parts.indexOf("floor") >= 0) {
42035
+ const showsRange = !TextureFrameSeriesAnimator.IsTransformed(this.metadata);
42036
+ if (showsRange && parts.indexOf("floor") >= 0) {
42025
42037
  range.push("min: -000.00");
42026
42038
  }
42027
- if (parts.indexOf("ceiling") >= 0) {
42039
+ if (showsRange && parts.indexOf("ceiling") >= 0) {
42028
42040
  range.push("max: -000.00");
42029
42041
  }
42030
42042
  if (range.length) {
@@ -43954,9 +43966,10 @@ function syncTextureValueLabels(params) {
43954
43966
  let lastVersion = -1;
43955
43967
  let appliedFloor = null;
43956
43968
  let appliedCeiling = null;
43957
- // The extremes are what turn an anomaly frame back into a reading, so they are worth two extra
43958
- // Range GETs here even though nothing else in the render path wants them.
43959
- animator.EnsureExtremes();
43969
+ // Two extra Range GETs, and worth it only because a label draws the cell's own range from them.
43970
+ if (!TextureFrameSeriesAnimator.IsTransformed(metadata)) {
43971
+ animator.EnsureExtremes();
43972
+ }
43960
43973
  const remove = viewer.scene.preRender.addEventListener(() => {
43961
43974
  if (animator.IsDisposed()) {
43962
43975
  return;
@@ -45606,7 +45619,7 @@ var StyleUtils;
45606
45619
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
45607
45620
  })(StyleUtils || (StyleUtils = {}));
45608
45621
 
45609
- const VERSION = "7.2.3";
45622
+ const VERSION = "7.2.4";
45610
45623
  /**
45611
45624
  * Updates the environment instance used by bruce-cesium to one specified.
45612
45625
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.