@vesium/plot 1.0.1-beta.26 → 1.0.1-beta.28

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Xiankq <https://github.com/xiankq>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,58 @@
1
- ../../README.md
1
+ # @vesium/plot [![NPM version](https://img.shields.io/npm/v/@vesium/plot?color=a1b858)](https://www.npmjs.com/package/@vesium/plot)
2
+
3
+ > This is an additional library to [Vesium](https://github.com/GeoVueJS/vesium).
4
+
5
+ ---
6
+
7
+
8
+ <p align="center">
9
+ <img src="./assets/logo.svg" align="center" width="15%" />
10
+ </p>
11
+
12
+ <h1 align="center">Vesium</h1>
13
+
14
+ <p align="center">Vue component and composition-api library for Cesium.</p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.npmjs.com/package/@vesium/core" target="__blank"><img src="https://img.shields.io/npm/v/@vesium/core?color=a1b858&label=" alt="NPM version"></a>
18
+ <a href="https://www.npmjs.com/package/@vesium/core" target="__blank"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@vesium/core?color=50a36f&label="></a>
19
+ <a href="https://github.com/GeoVueJS/vesium" target="__blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/GeoVueJS/vesium?style=social"></a>
20
+ </p>
21
+
22
+ > 🚧 This project is under development, and the API may change frequently.
23
+
24
+ ## Features
25
+
26
+ - 🎯 **Intuitive** - VueUse-style API design, familiar to Vue developers
27
+ - 💪 **Type Strong** - Written in TypeScript, with full TS support
28
+ - 🏪 **Modular** - Tree-shakeable ESM modules
29
+ - 🌐 **Full Featured** - Comprehensive Cesium functionality support
30
+ - 🎮 **Interactive** - Rich interactive capabilities with map elements
31
+ - ⚡️ **Lightweight** - No bloated dependencies
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ # npm
37
+ npm i cesium @vueuse/core vesium
38
+
39
+ # yarn
40
+ yarn add cesium @vueuse/core vesium
41
+
42
+ # pnpm
43
+ pnpm add cesium @vueuse/core vesium
44
+ ```
45
+
46
+ <template>
47
+ <div ref="cesiumContainer" style="width: 100%; height: 100%" />
48
+ </template>
49
+ ```
50
+
51
+ ## 🌸 Credits
52
+
53
+ - [VueUse](https://github.com/vueuse/vueuse) - Collection of Vue Composition Utilities
54
+ - [Cesium](https://github.com/CesiumGS/cesium) - An open-source JavaScript library for world-class 3D globes and maps
55
+
56
+ ## 📄 License
57
+
58
+ [MIT](./LICENSE) License © 2025 [GeoVueJS](https://github.com/GeoVueJS)
package/dist/index.cjs CHANGED
@@ -15,25 +15,30 @@ var PlotAction = /* @__PURE__ */ ((PlotAction2) => {
15
15
  PlotAction2[PlotAction2["ACTIVE"] = 2] = "ACTIVE";
16
16
  return PlotAction2;
17
17
  })(PlotAction || {});
18
+ class PlotSkeletonEntity extends cesium.Entity {
19
+ constructor(options) {
20
+ super(options);
21
+ }
22
+ }
18
23
  function control() {
19
24
  return {
20
- diabled: ({ active }) => !active,
25
+ disabled: ({ active }) => !active,
21
26
  cursor: "pointer",
22
27
  dragCursor: "crosshair",
23
- onDrag({ viewer, sample, packable, context, index, lockCamera }) {
28
+ onDrag({ viewer, sampled, packable, context, index, lockCamera }) {
24
29
  lockCamera();
25
30
  const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
26
31
  if (position) {
27
32
  const positions = [...packable.positions ?? []];
28
33
  positions[index] = position;
29
- sample.setSample({
34
+ sampled.setSample({
30
35
  time: packable.time,
31
36
  derivative: packable.derivative,
32
37
  positions
33
38
  });
34
39
  }
35
40
  },
36
- onKeyPressed({ viewer, keyEvent, sample, packable, index }) {
41
+ onKeyPressed({ viewer, keyEvent, sampled, packable, index }) {
37
42
  var _a;
38
43
  const height = (_a = shared.toCartographic(viewer.camera.position)) == null ? void 0 : _a.height;
39
44
  if (!height || !["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(keyEvent.key))
@@ -62,7 +67,7 @@ function control() {
62
67
  cartographic.latitude += distance * Math.cos(newHeading);
63
68
  cartographic.longitude += distance * Math.sin(newHeading);
64
69
  positions[index] = shared.toCartesian3(cartographic);
65
- sample.setSample({
70
+ sampled.setSample({
66
71
  time: packable.time,
67
72
  derivative: packable.derivative,
68
73
  positions
@@ -90,7 +95,7 @@ function control() {
90
95
  function interval() {
91
96
  let dragIndex = -1;
92
97
  return {
93
- diabled: ({ active, defining }) => !active || defining,
98
+ disabled: ({ active, defining }) => !active || defining,
94
99
  cursor: "pointer",
95
100
  dragCursor: "crosshair",
96
101
  format(packable) {
@@ -103,7 +108,7 @@ function interval() {
103
108
  return cesium.Cartesian3.midpoint(position, next, new cesium.Cartesian3());
104
109
  });
105
110
  },
106
- onDrag({ viewer, sample, packable, context, index, lockCamera, dragging }) {
111
+ onDrag({ viewer, sampled, packable, context, index, lockCamera, dragging }) {
107
112
  lockCamera();
108
113
  const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
109
114
  if (!position) {
@@ -119,7 +124,7 @@ function interval() {
119
124
  if (!dragging) {
120
125
  dragIndex = -1;
121
126
  }
122
- sample.setSample({
127
+ sampled.setSample({
123
128
  time: packable.time,
124
129
  derivative: packable.derivative,
125
130
  positions
@@ -150,7 +155,7 @@ function interval() {
150
155
  function intervalNonclosed() {
151
156
  let dragIndex = -1;
152
157
  return {
153
- diabled: ({ active, defining }) => !active || defining,
158
+ disabled: ({ active, defining }) => !active || defining,
154
159
  cursor: "pointer",
155
160
  dragCursor: "crosshair",
156
161
  format(packable) {
@@ -158,11 +163,13 @@ function intervalNonclosed() {
158
163
  if (_positions.length < 2) {
159
164
  return [];
160
165
  }
161
- return _positions.slice(0, _positions.length - 1).map((position, i) => {
162
- return cesium.Cartesian3.midpoint(position, _positions[i + 1], new cesium.Cartesian3());
163
- });
166
+ const midpoints = [];
167
+ for (let i = 0; i < _positions.length - 1; i++) {
168
+ midpoints.push(cesium.Cartesian3.midpoint(_positions[i], _positions[i + 1], new cesium.Cartesian3()));
169
+ }
170
+ return midpoints;
164
171
  },
165
- onDrag({ viewer, sample, packable, context, index, lockCamera, dragging }) {
172
+ onDrag({ viewer, sampled, packable, context, index, lockCamera, dragging }) {
166
173
  lockCamera();
167
174
  const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
168
175
  if (!position) {
@@ -178,7 +185,7 @@ function intervalNonclosed() {
178
185
  if (!dragging) {
179
186
  dragIndex = -1;
180
187
  }
181
- sample.setSample({
188
+ sampled.setSample({
182
189
  time: packable.time,
183
190
  derivative: packable.derivative,
184
191
  positions
@@ -208,7 +215,7 @@ const svg = `data:image/svg+xml;utf8,${encodeURIComponent(
208
215
  )}`;
209
216
  function moved() {
210
217
  return {
211
- diabled: ({ active, defining }) => !active || defining,
218
+ disabled: ({ active, defining }) => !active || defining,
212
219
  cursor: "pointer",
213
220
  dragCursor: "crosshair",
214
221
  format(packable) {
@@ -222,7 +229,7 @@ function moved() {
222
229
  return [shared.toCartesian3(center)];
223
230
  }
224
231
  },
225
- onDrag({ viewer, sample, packable, context, lockCamera, dragging }) {
232
+ onDrag({ viewer, sampled, packable, context, lockCamera, dragging }) {
226
233
  dragging && lockCamera();
227
234
  const startPosition = shared.canvasCoordToCartesian(context.startPosition, viewer.scene);
228
235
  const endPosition = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
@@ -231,7 +238,7 @@ function moved() {
231
238
  }
232
239
  const offset = cesium.Cartesian3.subtract(endPosition, startPosition, new cesium.Cartesian3());
233
240
  const positions = [...packable.positions ?? []];
234
- sample.setSample({
241
+ sampled.setSample({
235
242
  time: packable.time,
236
243
  derivative: packable.derivative,
237
244
  positions: positions.map((position) => cesium.Cartesian3.add(position, offset, new cesium.Cartesian3()))
@@ -401,16 +408,20 @@ const _PlotScheme = class _PlotScheme {
401
408
  this.complete = options.complete;
402
409
  this.forceComplete = options.forceComplete;
403
410
  this.definingCursor = options.definingCursor ?? "crosshair";
404
- this.skeletons = ((_a = options.skeletons) == null ? void 0 : _a.map((item) => shared.isFunction(item) ? item() : item)) ?? [];
411
+ this.skeletons = ((_a = options.skeletons) == null ? void 0 : _a.map((item) => item())) ?? [];
405
412
  this.render = options.render;
406
413
  }
407
- static getRecordTypes() {
414
+ static getCacheTypes() {
408
415
  return [...this._record.keys()];
409
416
  }
410
- static getRecord(type) {
417
+ static getCache(type) {
411
418
  return _PlotScheme._record.get(type);
412
419
  }
413
- static setRecord(scheme) {
420
+ /**
421
+ * 设置标绘方案
422
+ * @param scheme
423
+ */
424
+ static setCache(scheme) {
414
425
  shared.assertError(!scheme.type, "`scheme.type` is required");
415
426
  _PlotScheme._record.set(scheme.type, scheme);
416
427
  }
@@ -419,7 +430,7 @@ const _PlotScheme = class _PlotScheme {
419
430
  */
420
431
  static resolve(maybeScheme) {
421
432
  if (typeof maybeScheme === "string") {
422
- const _scheme = _PlotScheme.getRecord(maybeScheme);
433
+ const _scheme = _PlotScheme.getCache(maybeScheme);
423
434
  core.assert(!!_scheme, `scheme ${maybeScheme} not found`);
424
435
  return _scheme;
425
436
  } else if (!(maybeScheme instanceof _PlotScheme)) {
@@ -684,31 +695,45 @@ class Plot {
684
695
  shared.createCesiumAttribute(this, "disabled", !!options.disabled);
685
696
  shared.createCesiumAttribute(this, "defining", true);
686
697
  shared.createCesiumAttribute(this, "scheme", PlotScheme.resolve(options.scheme), { readonly: true });
687
- const sample = options.sample instanceof SampledPlotProperty ? options.sample : new SampledPlotProperty(options.sample);
688
- shared.createCesiumProperty(this, "sample", sample);
698
+ const sampled = options.sampled instanceof SampledPlotProperty ? options.sampled : new SampledPlotProperty(options.sampled);
699
+ shared.createCesiumProperty(this, "sampled", sampled);
689
700
  shared.createCesiumAttribute(this, "entities", []);
690
701
  shared.createCesiumAttribute(this, "primitives", []);
691
702
  shared.createCesiumAttribute(this, "groundPrimitives", []);
692
703
  shared.createCesiumAttribute(this, "skeletonEntities", []);
693
704
  }
705
+ /**
706
+ * An event that is raised when a property is changed.
707
+ */
694
708
  get definitionChanged() {
695
709
  return this._definitionChanged;
696
710
  }
711
+ /**
712
+ * 当前标绘是否处于定义态
713
+ */
697
714
  isDefining() {
698
715
  return this.defining;
699
716
  }
717
+ /**
718
+ * 获取当前标绘的entity数组
719
+ */
700
720
  getEntities() {
701
721
  return [...this.entities];
702
722
  }
723
+ /**
724
+ * 获取当前标绘的primitive数组
725
+ */
703
726
  getPrimitives() {
704
727
  return [...this.primitives];
705
728
  }
729
+ /**
730
+ * 获取当前标绘的贴地primitive数组
731
+ */
706
732
  getGroundPrimitives() {
707
733
  return [...this.groundPrimitives];
708
734
  }
709
735
  /**
710
- * 获取该标绘的骨架点entity数组
711
- *
736
+ * 获取当前标绘标绘的骨架点entity数组
712
737
  */
713
738
  getSkeletonEntities() {
714
739
  return [...this.skeletonEntities];
@@ -747,15 +772,15 @@ function useRender(plots, current, getCurrentTime) {
747
772
  () => plots.value.map((item) => item.definitionChanged),
748
773
  (_scope, key, newValue, oldValue) => {
749
774
  if (key === "entities") {
750
- const { added, removed } = shared.arrayDifference(newValue, oldValue);
775
+ const { added, removed } = shared.arrayDiff(newValue, oldValue);
751
776
  added.forEach((item) => entityScope.add(item));
752
777
  removed.forEach((item) => entityScope.remove(item));
753
778
  } else if (key === "primitives") {
754
- const { added, removed } = shared.arrayDifference(newValue, oldValue);
779
+ const { added, removed } = shared.arrayDiff(newValue, oldValue);
755
780
  added.forEach((item) => primitiveScope.add(item));
756
781
  removed.forEach((item) => primitiveScope.remove(item));
757
782
  } else if (key === "groundPrimitives") {
758
- const { added, removed } = shared.arrayDifference(newValue, oldValue);
783
+ const { added, removed } = shared.arrayDiff(newValue, oldValue);
759
784
  added.forEach((item) => groundPrimitiveScope.add(item));
760
785
  removed.forEach((item) => groundPrimitiveScope.remove(item));
761
786
  }
@@ -764,7 +789,7 @@ function useRender(plots, current, getCurrentTime) {
764
789
  const update = shared.throttle(async (plot) => {
765
790
  var _a, _b;
766
791
  const reslut = await ((_b = (_a = plot.scheme).render) == null ? void 0 : _b.call(_a, {
767
- packable: plot.sample.getValue(getCurrentTime()),
792
+ packable: plot.sampled.getValue(getCurrentTime()),
768
793
  mouse: plot.defining ? mouseCartesian.value : void 0,
769
794
  defining: plot.defining,
770
795
  previous: {
@@ -783,7 +808,7 @@ function useRender(plots, current, getCurrentTime) {
783
808
  core$1.useCesiumEventListener(
784
809
  () => plots.value.map((item) => item.definitionChanged),
785
810
  (plot, key) => {
786
- if (["disabled", "defining", "scheme", "sample", "time"].includes(key)) {
811
+ if (["disabled", "defining", "scheme", "sampled", "time"].includes(key)) {
787
812
  update(plot);
788
813
  }
789
814
  }
@@ -802,7 +827,7 @@ function useSampled(current, getCurrentTime) {
802
827
  const doubleClicking = vue.ref(false);
803
828
  const packable = vue.computed(() => {
804
829
  var _a;
805
- return (_a = current.value) == null ? void 0 : _a.sample.getValue(getCurrentTime());
830
+ return (_a = current.value) == null ? void 0 : _a.sampled.getValue(getCurrentTime());
806
831
  });
807
832
  core$1.useScreenSpaceEventHandler(
808
833
  cesium.ScreenSpaceEventType.LEFT_CLICK,
@@ -815,7 +840,7 @@ function useSampled(current, getCurrentTime) {
815
840
  if (doubleClicking.value) {
816
841
  return;
817
842
  }
818
- const { scheme, defining, sample } = current.value;
843
+ const { scheme, defining, sampled } = current.value;
819
844
  if (!defining) {
820
845
  return;
821
846
  }
@@ -825,7 +850,7 @@ function useSampled(current, getCurrentTime) {
825
850
  }
826
851
  (_a = packable.value).positions ?? (_a.positions = []);
827
852
  packable.value.positions.push(position);
828
- sample.setSample(packable.value);
853
+ sampled.setSample(packable.value);
829
854
  const completed = (_b = scheme.complete) == null ? void 0 : _b.call(scheme, packable.value);
830
855
  completed && (current.value.defining = false);
831
856
  }
@@ -859,7 +884,7 @@ function useSampled(current, getCurrentTime) {
859
884
  if (!current.value || !packable.value) {
860
885
  return;
861
886
  }
862
- const { defining, sample } = current.value;
887
+ const { defining, sampled } = current.value;
863
888
  if (!defining) {
864
889
  return;
865
890
  }
@@ -868,7 +893,7 @@ function useSampled(current, getCurrentTime) {
868
893
  return;
869
894
  }
870
895
  packable.value.positions.splice(packable.value.positions.length - 1, 1);
871
- sample.setSample(packable.value);
896
+ sampled.setSample(packable.value);
872
897
  }
873
898
  );
874
899
  const definingCursorCss = vue.ref();
@@ -891,17 +916,12 @@ function useSampled(current, getCurrentTime) {
891
916
  var _a;
892
917
  return (_a = current.value) == null ? void 0 : _a.definitionChanged;
893
918
  }, (plot, key) => {
894
- if (key === "defining" || key === "sample") {
919
+ if (key === "defining" || key === "sampled") {
895
920
  setDefiningCursorCss();
896
921
  }
897
922
  });
898
923
  vue.watch(current, () => setDefiningCursorCss());
899
924
  }
900
- class PlotSkeletonEntity extends cesium.Entity {
901
- constructor(options) {
902
- super(options);
903
- }
904
- }
905
925
  function useSkeleton(plots, current, getCurrentTime) {
906
926
  const viewer = core$1.useViewer();
907
927
  const dataSource = core$1.useDataSource(new cesium.CustomDataSource());
@@ -921,14 +941,14 @@ function useSkeleton(plots, current, getCurrentTime) {
921
941
  if (destroyed || plot.disabled) {
922
942
  plot.skeletonEntities = [];
923
943
  } else {
924
- const packable = plot.sample.getValue(getCurrentTime());
944
+ const packable = plot.sampled.getValue(getCurrentTime());
925
945
  const defining = plot.defining;
926
946
  const active = current.value === plot;
927
947
  const skeletons = plot.scheme.skeletons;
928
948
  skeletons.forEach((skeleton) => {
929
949
  var _a;
930
- const diabled = shared.isFunction(skeleton.diabled) ? skeleton.diabled({ active, defining }) : skeleton.diabled;
931
- if (diabled) {
950
+ const disabled = shared.isFunction(skeleton.disabled) ? skeleton.disabled({ active, defining }) : skeleton.disabled;
951
+ if (disabled) {
932
952
  return;
933
953
  }
934
954
  const positions = ((_a = skeleton.format) == null ? void 0 : _a.call(skeleton, packable)) ?? (packable == null ? void 0 : packable.positions) ?? [];
@@ -989,10 +1009,10 @@ function useSkeleton(plots, current, getCurrentTime) {
989
1009
  activeEntity.value = entity;
990
1010
  const skeleton = entity.skeleton;
991
1011
  const index = entity.index;
992
- const packable = plot.sample.getValue(getCurrentTime());
1012
+ const packable = plot.sampled.getValue(getCurrentTime());
993
1013
  (_a = skeleton.onDrag) == null ? void 0 : _a.call(skeleton, {
994
1014
  viewer: viewer.value,
995
- sample: plot.sample,
1015
+ sampled: plot.sampled,
996
1016
  packable,
997
1017
  active: current.value === plot,
998
1018
  index,
@@ -1012,10 +1032,10 @@ function useSkeleton(plots, current, getCurrentTime) {
1012
1032
  const plot = entity.plot;
1013
1033
  const skeleton = entity.skeleton;
1014
1034
  const index = entity.index;
1015
- const packable = plot.sample.getValue(getCurrentTime());
1035
+ const packable = plot.sampled.getValue(getCurrentTime());
1016
1036
  (_a = skeleton.onKeyPressed) == null ? void 0 : _a.call(skeleton, {
1017
1037
  viewer: viewer.value,
1018
- sample: plot.sample,
1038
+ sampled: plot.sampled,
1019
1039
  packable,
1020
1040
  index,
1021
1041
  keyEvent
@@ -1041,10 +1061,10 @@ function useSkeleton(plots, current, getCurrentTime) {
1041
1061
  const plot = entity.plot;
1042
1062
  const skeleton = entity.skeleton;
1043
1063
  const index = entity.index;
1044
- const packable = plot.sample.getValue(getCurrentTime());
1064
+ const packable = plot.sampled.getValue(getCurrentTime());
1045
1065
  (_a = skeleton.onLeftClick) == null ? void 0 : _a.call(skeleton, {
1046
1066
  viewer: viewer.value,
1047
- sample: plot.sample,
1067
+ sampled: plot.sampled,
1048
1068
  packable,
1049
1069
  active: current.value === plot,
1050
1070
  defining: plot.defining,
@@ -1061,11 +1081,11 @@ function useSkeleton(plots, current, getCurrentTime) {
1061
1081
  removed.forEach((plot) => update(plot, true));
1062
1082
  });
1063
1083
  core$1.useCesiumEventListener(() => plots.value.map((plot) => plot.definitionChanged), (plot, key, newValue, oldValue) => {
1064
- if (["disabled", "defining", "scheme", "sample", "time"].includes(key)) {
1084
+ if (["disabled", "defining", "scheme", "sampled", "time"].includes(key)) {
1065
1085
  update(plot);
1066
1086
  }
1067
1087
  if (key === "skeletonEntities") {
1068
- const { added, removed } = shared.arrayDifference(newValue, oldValue);
1088
+ const { added, removed } = shared.arrayDiff(newValue, oldValue);
1069
1089
  added.forEach((item) => entityScope.add(item));
1070
1090
  removed.forEach((item) => entityScope.remove(item));
1071
1091
  }
@@ -1094,11 +1114,11 @@ function usePlot(options) {
1094
1114
  core$1.useCesiumEventListener([
1095
1115
  () => {
1096
1116
  var _a;
1097
- return (_a = current.value) == null ? void 0 : _a.sample.definitionChanged;
1117
+ return (_a = current.value) == null ? void 0 : _a.sampled.definitionChanged;
1098
1118
  }
1099
1119
  ], () => {
1100
1120
  var _a;
1101
- packable.value = (_a = current.value) == null ? void 0 : _a.sample.getValue(getCurrentTime());
1121
+ packable.value = (_a = current.value) == null ? void 0 : _a.sampled.getValue(getCurrentTime());
1102
1122
  });
1103
1123
  useSampled(current, getCurrentTime);
1104
1124
  useRender(plots, current, getCurrentTime);
@@ -1124,7 +1144,7 @@ function usePlot(options) {
1124
1144
  var _a, _b;
1125
1145
  if (previous) {
1126
1146
  if (previous.defining) {
1127
- const packable2 = previous.sample.getValue(getCurrentTime());
1147
+ const packable2 = previous.sampled.getValue(getCurrentTime());
1128
1148
  const completed = (_b = (_a = previous.scheme).forceComplete) == null ? void 0 : _b.call(_a, packable2);
1129
1149
  if (completed) {
1130
1150
  previous.defining = false;