bruce-models 4.2.6 → 4.2.8

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.
@@ -3611,6 +3611,21 @@
3611
3611
  else if (path[0] == "boundaries") {
3612
3612
  value = checkForValue(["Bruce"].concat(path));
3613
3613
  }
3614
+ else if (path[0] == "geometryPivot") {
3615
+ value = checkForValue(["Bruce"].concat(path));
3616
+ }
3617
+ else if (path[0] == "worldPivot") {
3618
+ value = checkForValue(["Bruce"].concat(path));
3619
+ }
3620
+ else if (path[0] == "worldPosition") {
3621
+ value = checkForValue(["Bruce"].concat(path));
3622
+ }
3623
+ else if (path[0] == "tilesetID") {
3624
+ value = checkForValue(["Bruce"].concat(path));
3625
+ }
3626
+ else if (path[0] == "geometryRadius") {
3627
+ value = checkForValue(["Bruce"].concat(path));
3628
+ }
3614
3629
  // Now we'll check against properties that could still be in the top-level and haven't been migrated yet.
3615
3630
  if (path[0] == "Bruce" && path.length > 1) {
3616
3631
  if (path[1] == "location") {
@@ -3625,6 +3640,21 @@
3625
3640
  else if (path[1] == "boundaries") {
3626
3641
  value = checkForValue(path.slice(1));
3627
3642
  }
3643
+ else if (path[1] == "geometryPivot") {
3644
+ value = checkForValue(path.slice(1));
3645
+ }
3646
+ else if (path[1] == "worldPivot") {
3647
+ value = checkForValue(path.slice(1));
3648
+ }
3649
+ else if (path[1] == "worldPosition") {
3650
+ value = checkForValue(path.slice(1));
3651
+ }
3652
+ else if (path[1] == "tilesetID") {
3653
+ value = checkForValue(path.slice(1));
3654
+ }
3655
+ else if (path[1] == "geometryRadius") {
3656
+ value = checkForValue(path.slice(1));
3657
+ }
3628
3658
  }
3629
3659
  }
3630
3660
  return value;
@@ -3900,6 +3930,39 @@
3900
3930
  });
3901
3931
  }
3902
3932
  Entity.GetList = GetList;
3933
+ /**
3934
+ * Helper method that returns an Entity object.
3935
+ * This will ensure the basics exist ("Bruce" structure).
3936
+ * @param params
3937
+ */
3938
+ function Assert(params) {
3939
+ var _a, _b;
3940
+ let { entityId, entityTypeId, baseEntity } = params ? params : {};
3941
+ if (!entityId) {
3942
+ entityId = (_a = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"]) === null || _a === void 0 ? void 0 : _a["ID"];
3943
+ }
3944
+ if (!entityId) {
3945
+ entityId = exports.ObjectUtils.UId();
3946
+ }
3947
+ if (!entityTypeId) {
3948
+ entityTypeId = (_b = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"]) === null || _b === void 0 ? void 0 : _b["EntityType.ID"];
3949
+ }
3950
+ let bruce = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"];
3951
+ if (!bruce) {
3952
+ bruce = {
3953
+ "EntityType.ID": null
3954
+ };
3955
+ }
3956
+ bruce["ID"] = entityId;
3957
+ bruce["EntityType.ID"] = entityTypeId;
3958
+ return Object.assign(Object.assign({}, baseEntity), { "Bruce": bruce });
3959
+ }
3960
+ Entity.Assert = Assert;
3961
+ /**
3962
+ * Helper method that returns a geojson object for a given set of Entities.
3963
+ * @param params
3964
+ * @returns
3965
+ */
3903
3966
  function ToGeoJson(params) {
3904
3967
  const { entities, excludeAltitude, altitude, includeUserData, allowedDisplayTypes } = params;
3905
3968
  const features = [];
@@ -12979,7 +13042,7 @@
12979
13042
  })(exports.DataSource || (exports.DataSource = {}));
12980
13043
 
12981
13044
  // This is updated with the package.json version on build.
12982
- const VERSION = "4.2.6";
13045
+ const VERSION = "4.2.8";
12983
13046
 
12984
13047
  exports.VERSION = VERSION;
12985
13048
  exports.AbstractApi = AbstractApi;