bruce-cesium 7.7.5 → 7.7.6
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 +19 -7
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +17 -5
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/xgrids-render-engine.js +16 -4
- package/dist/lib/rendering/xgrids-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
2
|
-
import { Cartographic,
|
|
3
|
-
import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1,
|
|
2
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, HeightReference, ColorBlendMode, HeadingPitchRoll, Math as Math$1, Transforms, ShadowMode, Cartesian3, Model, ClassificationType, Matrix4, JulianDate, Quaternion, ConstantPositionProperty, DistanceDisplayCondition, ArcType, CornerType, ShaderSource, Ellipsoid, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, ImageMaterialProperty, SceneMode, IntersectionTests, Ray, SceneTransforms, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, Rectangle, NearFarScalar, Matrix3, KmlDataSource, FeatureDetection, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Intersect, WebGLConstants, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, OrthographicFrustum, EasingFunction, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, ScreenSpaceEventHandler, ScreenSpaceEventType, CustomDataSource, PolygonPipeline, GeometryInstance, Fullscreen, CzmlDataSource } from 'cesium';
|
|
3
|
+
import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1, ClientFileValueMap, Color as Color$1, ProjectView, ProjectViewBookmark, ZoomControl, Api, Bounds, Assembly, EntityCoords, BruceApi, EntityRelation, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, ProjectViewBookmarkGroup, EntityAttachment, EntityAttribute, MathUtils } from 'bruce-models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -28652,26 +28652,38 @@ var XGridsRenderEngine;
|
|
|
28652
28652
|
*/
|
|
28653
28653
|
function ApplyPosition(params) {
|
|
28654
28654
|
const { renderObject, origin, rotation, dontRotate, dontTransform } = params;
|
|
28655
|
-
if (!renderObject) {
|
|
28655
|
+
if (!renderObject || dontTransform) {
|
|
28656
28656
|
return;
|
|
28657
28657
|
}
|
|
28658
28658
|
const lat = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.latitude, 0);
|
|
28659
28659
|
const lon = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.longitude, 0);
|
|
28660
28660
|
const alt = EnsureNumber(origin === null || origin === void 0 ? void 0 : origin.altitude, 0);
|
|
28661
28661
|
const scale = EnsureNumber((origin === null || origin === void 0 ? void 0 : origin.scale) || 1, 1);
|
|
28662
|
+
// A complete matrix avoids SDK setters whose translation, rotation and scale contracts differ.
|
|
28663
|
+
if (typeof renderObject.setModelMatrix === "function") {
|
|
28664
|
+
const matrix = Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(lon, lat, alt));
|
|
28665
|
+
if (!dontRotate) {
|
|
28666
|
+
const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.z), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.x), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.y));
|
|
28667
|
+
const local = Matrix4.fromRotation(Matrix3.fromHeadingPitchRoll(hpr));
|
|
28668
|
+
Matrix4.multiply(matrix, local, matrix);
|
|
28669
|
+
Matrix4.multiplyByUniformScale(matrix, scale, matrix);
|
|
28670
|
+
}
|
|
28671
|
+
renderObject.setModelMatrix(matrix);
|
|
28672
|
+
return;
|
|
28673
|
+
}
|
|
28662
28674
|
if (!dontTransform) {
|
|
28663
28675
|
const pos = Cartesian3.fromDegrees(lon, lat, alt);
|
|
28664
|
-
if (typeof renderObject.setTranslation ===
|
|
28676
|
+
if (typeof renderObject.setTranslation === "function") {
|
|
28665
28677
|
renderObject.setTranslation(pos);
|
|
28666
28678
|
}
|
|
28667
28679
|
}
|
|
28668
28680
|
if (!dontRotate && !dontTransform) {
|
|
28669
28681
|
const hpr = HeadingPitchRoll.fromDegrees(EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.z), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.x), EnsureNumber(rotation === null || rotation === void 0 ? void 0 : rotation.y), new HeadingPitchRoll());
|
|
28670
28682
|
const rotMatrix = Matrix3.fromHeadingPitchRoll(hpr);
|
|
28671
|
-
if (typeof renderObject.setRotation ===
|
|
28683
|
+
if (typeof renderObject.setRotation === "function") {
|
|
28672
28684
|
renderObject.setRotation(rotMatrix);
|
|
28673
28685
|
}
|
|
28674
|
-
if (typeof renderObject.setScale ===
|
|
28686
|
+
if (typeof renderObject.setScale === "function") {
|
|
28675
28687
|
renderObject.setScale(new Cartesian3(scale, scale, scale));
|
|
28676
28688
|
}
|
|
28677
28689
|
}
|
|
@@ -57715,7 +57727,7 @@ var StyleUtils;
|
|
|
57715
57727
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
57716
57728
|
})(StyleUtils || (StyleUtils = {}));
|
|
57717
57729
|
|
|
57718
|
-
const VERSION = "7.7.
|
|
57730
|
+
const VERSION = "7.7.6";
|
|
57719
57731
|
/**
|
|
57720
57732
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
57721
57733
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|