bruce-cesium 7.0.5 → 7.0.7

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.
@@ -6360,7 +6360,7 @@
6360
6360
  rego.editing == true ||
6361
6361
  // Part of a collection we did not create, eg. a geojson data source, which may have its own rules for
6362
6362
  // what is in the scene. Our own per-menu-item data sources are fair game.
6363
- (rego.collection && !IsCCollectionOwned(rego.collection)) ||
6363
+ exports.VisualsRegister.IsForeignCollection(rego) ||
6364
6364
  // We won't cull historic records as they may be interpolating their locations.
6365
6365
  Boolean(rego.outline && rego.outline.some(x => !!x.DateTime))) {
6366
6366
  return true;
@@ -6648,6 +6648,7 @@
6648
6648
  VisualRegisterCuller.IsCullingIgnored = IsCullingIgnored;
6649
6649
  /**
6650
6650
  * Discards what the culler knows about an entity's extent, so its next check measures the geometry again.
6651
+ * The last cull decision is deliberately kept, see the loop below.
6651
6652
  * @param visuals an entity, an entity id, or an array of either.
6652
6653
  */
6653
6654
  function InvalidateBounds(visuals) {
@@ -6671,8 +6672,6 @@
6671
6672
  continue;
6672
6673
  }
6673
6674
  ids.push(part.id);
6674
- // The per-entity answer is derived from the sphere, so it goes stale with it.
6675
- delete part[VisualRegisterCuller.VISUAL_CULL_KEY];
6676
6675
  }
6677
6676
  }
6678
6677
  invalidateBounds(ids);
@@ -7048,6 +7047,13 @@
7048
7047
  return Object.keys(state).length === idKeys;
7049
7048
  }
7050
7049
  (function (VisualsRegister) {
7050
+ /**
7051
+ * Whether a visual lives in a collection somebody else owns, eg. a geojson or KML data source that manages its own scene membership.
7052
+ */
7053
+ function IsForeignCollection(rego) {
7054
+ return Boolean(rego === null || rego === void 0 ? void 0 : rego.collection) && !IsCCollectionOwned(rego.collection);
7055
+ }
7056
+ VisualsRegister.IsForeignCollection = IsForeignCollection;
7051
7057
  let EVisualUpdateType;
7052
7058
  (function (EVisualUpdateType) {
7053
7059
  EVisualUpdateType["Add"] = "ADD";
@@ -8189,6 +8195,7 @@
8189
8195
  else {
8190
8196
  // The geometry almost certainly moved, so what was measured before is worthless.
8191
8197
  VisualRegisterCuller.InvalidateBounds(rego.visual);
8198
+ VisualRegisterCuller.MarkShouldRecheck(this.viewer);
8192
8199
  }
8193
8200
  }
8194
8201
  }
@@ -40293,7 +40300,7 @@
40293
40300
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
40294
40301
  })(exports.StyleUtils || (exports.StyleUtils = {}));
40295
40302
 
40296
- const VERSION = "7.0.5";
40303
+ const VERSION = "7.0.7";
40297
40304
  /**
40298
40305
  * Updates the environment instance used by bruce-cesium to one specified.
40299
40306
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.