@vesium/plot 1.0.1-beta.57 → 1.0.1-beta.61

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,4 +1,4 @@
1
- (function(exports, cesium, vesium, __vueuse_core, vue, __vesium_geometry, __turf_turf) {
1
+ (function(exports, cesium, vesium, _vueuse_core, vue, _vesium_geometry, _turf_turf) {
2
2
 
3
3
  //#region rolldown:runtime
4
4
  var __create = Object.create;
@@ -27,7 +27,7 @@
27
27
  }) : target, mod));
28
28
 
29
29
  //#endregion
30
- __turf_turf = __toESM(__turf_turf);
30
+ _turf_turf = __toESM(_turf_turf);
31
31
 
32
32
  //#region usePlot/PlotScheme.ts
33
33
  var PlotScheme = class PlotScheme {
@@ -100,7 +100,7 @@ __turf_turf = __toESM(__turf_turf);
100
100
  static resolve(maybeScheme) {
101
101
  if (typeof maybeScheme === "string") {
102
102
  const _scheme = PlotScheme.getCache(maybeScheme);
103
- (0, __vueuse_core.assert)(!!_scheme, `scheme ${maybeScheme} not found`);
103
+ (0, _vueuse_core.assert)(!!_scheme, `scheme ${maybeScheme} not found`);
104
104
  return _scheme;
105
105
  } else if (!(maybeScheme instanceof PlotScheme)) return new PlotScheme(maybeScheme);
106
106
  else return maybeScheme;
@@ -516,7 +516,7 @@ __turf_turf = __toESM(__turf_turf);
516
516
  (0, vesium.useScreenSpaceEventHandler)(cesium.ScreenSpaceEventType.MOUSE_MOVE, (event) => {
517
517
  mouseCartesian.value = (0, vesium.canvasCoordToCartesian)(event?.endPosition, viewer.value.scene);
518
518
  });
519
- (0, __vueuse_core.watchArray)(plots, (_value, _oldValue, added, removed = []) => {
519
+ (0, _vueuse_core.watchArray)(plots, (_value, _oldValue, added, removed = []) => {
520
520
  removed.forEach((plot) => {
521
521
  entityScope.removeWhere((item) => plot.entities.includes(item));
522
522
  primitiveScope.removeWhere((item) => plot.primitives.includes(item));
@@ -600,7 +600,7 @@ __turf_turf = __toESM(__turf_turf);
600
600
  return current.value?.sampled.getValue(getCurrentTime());
601
601
  });
602
602
  (0, vesium.useScreenSpaceEventHandler)(cesium.ScreenSpaceEventType.LEFT_CLICK, async (ctx) => {
603
- await (0, __vueuse_core.promiseTimeout)(1);
603
+ await (0, _vueuse_core.promiseTimeout)(1);
604
604
  if (!current.value || !packable.value) return;
605
605
  if (doubleClicking.value) return;
606
606
  const { scheme, defining, sampled } = current.value;
@@ -615,7 +615,7 @@ __turf_turf = __toESM(__turf_turf);
615
615
  (0, vesium.useScreenSpaceEventHandler)(cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK, async (ctx) => {
616
616
  if (!current.value || !packable.value) return;
617
617
  doubleClicking.value = true;
618
- await (0, __vueuse_core.promiseTimeout)(2);
618
+ await (0, _vueuse_core.promiseTimeout)(2);
619
619
  doubleClicking.value = false;
620
620
  const { scheme, defining } = current.value;
621
621
  if (!defining) return;
@@ -738,7 +738,7 @@ __turf_turf = __toESM(__turf_turf);
738
738
  }
739
739
  }));
740
740
  });
741
- (0, __vueuse_core.onKeyStroke)((keyEvent) => {
741
+ (0, _vueuse_core.onKeyStroke)((keyEvent) => {
742
742
  if (activeEntity.value) {
743
743
  const entity = activeEntity.value;
744
744
  const plot = entity.plot;
@@ -781,7 +781,7 @@ __turf_turf = __toESM(__turf_turf);
781
781
  } else activeEntity.value = void 0;
782
782
  }));
783
783
  });
784
- (0, __vueuse_core.watchArray)(plots, (value, oldValue, added, removed = []) => {
784
+ (0, _vueuse_core.watchArray)(plots, (value, oldValue, added, removed = []) => {
785
785
  added.forEach((plot) => update(plot));
786
786
  removed.forEach((plot) => update(plot, true));
787
787
  });
@@ -1682,7 +1682,7 @@ __turf_turf = __toESM(__turf_turf);
1682
1682
  entity.polygon.hierarchy = void 0;
1683
1683
  return context.previous;
1684
1684
  }
1685
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arc)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1685
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arc)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1686
1686
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1687
1687
  return { entities: [entity] };
1688
1688
  }
@@ -1710,7 +1710,7 @@ __turf_turf = __toESM(__turf_turf);
1710
1710
  entity.polygon.hierarchy = void 0;
1711
1711
  return context.previous;
1712
1712
  }
1713
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowAttackDirection)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1713
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowAttackDirection)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1714
1714
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1715
1715
  return { entities: [entity] };
1716
1716
  }
@@ -1738,7 +1738,7 @@ __turf_turf = __toESM(__turf_turf);
1738
1738
  entity.polygon.hierarchy = void 0;
1739
1739
  return context.previous;
1740
1740
  }
1741
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowAttackDirectionTailed)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1741
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowAttackDirectionTailed)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1742
1742
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1743
1743
  return { entities: [entity] };
1744
1744
  }
@@ -1762,7 +1762,7 @@ __turf_turf = __toESM(__turf_turf);
1762
1762
  }
1763
1763
  const coords = points.map((e) => (0, vesium.toCoord)(e));
1764
1764
  if (coords.length >= 3) {
1765
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowClamped)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1765
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowClamped)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1766
1766
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1767
1767
  } else entity.polygon.hierarchy = void 0;
1768
1768
  return { entities: [entity] };
@@ -1787,7 +1787,7 @@ __turf_turf = __toESM(__turf_turf);
1787
1787
  }
1788
1788
  const coords = points.map((e) => (0, vesium.toCoord)(e));
1789
1789
  if (coords.length >= 2) {
1790
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowStraight)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1790
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowStraight)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1791
1791
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1792
1792
  } else entity.polygon.hierarchy = void 0;
1793
1793
  return { entities: [entity] };
@@ -1812,7 +1812,7 @@ __turf_turf = __toESM(__turf_turf);
1812
1812
  }
1813
1813
  const coords = points.map((e) => (0, vesium.toCoord)(e));
1814
1814
  if (coords.length >= 2) {
1815
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowStraightSharp)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1815
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowStraightSharp)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1816
1816
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1817
1817
  } else entity.polygon.hierarchy = void 0;
1818
1818
  return { entities: [entity] };
@@ -1841,7 +1841,7 @@ __turf_turf = __toESM(__turf_turf);
1841
1841
  entity.polygon.hierarchy = void 0;
1842
1842
  return context.previous;
1843
1843
  }
1844
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowUnitCombatOperation)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1844
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowUnitCombatOperation)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1845
1845
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1846
1846
  return { entities: [entity] };
1847
1847
  }
@@ -1869,7 +1869,7 @@ __turf_turf = __toESM(__turf_turf);
1869
1869
  entity.polygon.hierarchy = void 0;
1870
1870
  return context.previous;
1871
1871
  }
1872
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.arrowUnitCombatOperationTailed)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1872
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.arrowUnitCombatOperationTailed)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1873
1873
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1874
1874
  return { entities: [entity] };
1875
1875
  }
@@ -1905,7 +1905,7 @@ __turf_turf = __toESM(__turf_turf);
1905
1905
  const longitude = c1.longitude - (c0.longitude - c1.longitude);
1906
1906
  coords.push((0, vesium.toCoord)(new cesium.Cartographic(longitude, latitude, height)));
1907
1907
  }
1908
- const hierarchy = new cesium.PolygonHierarchy((0, __vesium_geometry.assemblingPlace)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1908
+ const hierarchy = new cesium.PolygonHierarchy((0, _vesium_geometry.assemblingPlace)(coords).map((item) => (0, vesium.toCartesian3)(item)));
1909
1909
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1910
1910
  return { entities: [entity] };
1911
1911
  }
@@ -1938,7 +1938,7 @@ __turf_turf = __toESM(__turf_turf);
1938
1938
  }
1939
1939
  const wgs84s = positions.map((e) => (0, vesium.toCoord)(e));
1940
1940
  wgs84s.push(wgs84s[0]);
1941
- const { features } = __turf_turf.polygonSmooth(__turf_turf.polygon([wgs84s]), { iterations: 3 });
1941
+ const { features } = _turf_turf.polygonSmooth(_turf_turf.polygon([wgs84s]), { iterations: 3 });
1942
1942
  const hierarchy = new cesium.PolygonHierarchy(features[0].geometry.coordinates[0].map((item) => (0, vesium.toCartesian3)(item)).filter((e) => !!e));
1943
1943
  entity.polygon.hierarchy = new cesium.CallbackProperty(() => hierarchy, false);
1944
1944
  return { entities: [entity] };
@@ -2004,7 +2004,7 @@ __turf_turf = __toESM(__turf_turf);
2004
2004
  return context.previous;
2005
2005
  }
2006
2006
  const coords = positions.map((position) => (0, vesium.toCoord)(position));
2007
- const { geometry: { coordinates } } = __turf_turf.bezierSpline(__turf_turf.lineString(coords));
2007
+ const { geometry: { coordinates } } = _turf_turf.bezierSpline(_turf_turf.lineString(coords));
2008
2008
  entity.polyline.positions = new cesium.CallbackProperty(() => coordinates.map(vesium.toCartesian3), false);
2009
2009
  return { entities: [entity] };
2010
2010
  }