@vesium/plot 1.0.1-beta.25

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/index.cjs ADDED
@@ -0,0 +1,1177 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const cesium = require("cesium");
7
+ const shared = require("@vesium/shared");
8
+ const core = require("@vueuse/core");
9
+ const core$1 = require("@vesium/core");
10
+ const useViewer = require("@vesium/core/useViewer");
11
+ const vue = require("vue");
12
+ var PlotAction = /* @__PURE__ */ ((PlotAction2) => {
13
+ PlotAction2[PlotAction2["IDLE"] = 0] = "IDLE";
14
+ PlotAction2[PlotAction2["HOVER"] = 1] = "HOVER";
15
+ PlotAction2[PlotAction2["ACTIVE"] = 2] = "ACTIVE";
16
+ return PlotAction2;
17
+ })(PlotAction || {});
18
+ function control() {
19
+ return {
20
+ diabled: ({ active }) => !active,
21
+ cursor: "pointer",
22
+ dragCursor: "crosshair",
23
+ onDrag({ viewer, sample, packable, context, index, lockCamera }) {
24
+ lockCamera();
25
+ const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
26
+ if (position) {
27
+ const positions = [...packable.positions ?? []];
28
+ positions[index] = position;
29
+ sample.setSample({
30
+ time: packable.time,
31
+ derivative: packable.derivative,
32
+ positions
33
+ });
34
+ }
35
+ },
36
+ onKeyPressed({ viewer, keyEvent, sample, packable, index }) {
37
+ var _a;
38
+ const height = (_a = shared.toCartographic(viewer.camera.position)) == null ? void 0 : _a.height;
39
+ if (!height || !["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(keyEvent.key))
40
+ return;
41
+ keyEvent.preventDefault();
42
+ let headingAdjust = 0;
43
+ switch (keyEvent.key) {
44
+ case "ArrowRight":
45
+ headingAdjust = Math.PI / 2;
46
+ break;
47
+ case "ArrowDown":
48
+ headingAdjust = Math.PI;
49
+ break;
50
+ case "ArrowLeft":
51
+ headingAdjust = -Math.PI / 2;
52
+ break;
53
+ case "ArrowUp":
54
+ headingAdjust = 0;
55
+ break;
56
+ }
57
+ const newHeading = (viewer.camera.heading + headingAdjust) % (2 * Math.PI);
58
+ const positions = [...packable.positions ?? []];
59
+ const cartographic = shared.toCartographic(positions[index]);
60
+ const r = height / 1e5;
61
+ const distance = r * Math.PI / 180 / 1e3;
62
+ cartographic.latitude += distance * Math.cos(newHeading);
63
+ cartographic.longitude += distance * Math.sin(newHeading);
64
+ positions[index] = shared.toCartesian3(cartographic);
65
+ sample.setSample({
66
+ time: packable.time,
67
+ derivative: packable.derivative,
68
+ positions
69
+ });
70
+ },
71
+ render: ({ position, action }) => {
72
+ const colors = {
73
+ [PlotAction.IDLE]: cesium.Color.BLUE.withAlpha(0.4),
74
+ [PlotAction.HOVER]: cesium.Color.BLUE.withAlpha(0.6),
75
+ [PlotAction.ACTIVE]: cesium.Color.AQUA.withAlpha(1)
76
+ };
77
+ return {
78
+ position,
79
+ point: {
80
+ pixelSize: 8,
81
+ color: colors[action],
82
+ disableDepthTestDistance: Number.POSITIVE_INFINITY,
83
+ outlineWidth: 1,
84
+ outlineColor: cesium.Color.WHITE.withAlpha(0.4)
85
+ }
86
+ };
87
+ }
88
+ };
89
+ }
90
+ function interval() {
91
+ let dragIndex = -1;
92
+ return {
93
+ diabled: ({ active, defining }) => !active || defining,
94
+ cursor: "pointer",
95
+ dragCursor: "crosshair",
96
+ format(packable) {
97
+ const _positions = packable.positions ?? [];
98
+ if (_positions.length < 2) {
99
+ return [];
100
+ }
101
+ return _positions.map((position, i) => {
102
+ const next = i === _positions.length - 1 ? _positions[0] : _positions[i + 1];
103
+ return cesium.Cartesian3.midpoint(position, next, new cesium.Cartesian3());
104
+ });
105
+ },
106
+ onDrag({ viewer, sample, packable, context, index, lockCamera, dragging }) {
107
+ lockCamera();
108
+ const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
109
+ if (!position) {
110
+ return;
111
+ }
112
+ const positions = [...packable.positions ?? []];
113
+ if (dragIndex === -1) {
114
+ dragIndex = index;
115
+ positions.splice(index + 1, 0, position);
116
+ } else {
117
+ positions[dragIndex + 1] = position;
118
+ }
119
+ if (!dragging) {
120
+ dragIndex = -1;
121
+ }
122
+ sample.setSample({
123
+ time: packable.time,
124
+ derivative: packable.derivative,
125
+ positions
126
+ });
127
+ },
128
+ render: ({ position, action, active }) => {
129
+ if (!active) {
130
+ return;
131
+ }
132
+ const colors = {
133
+ [PlotAction.IDLE]: cesium.Color.GREEN.withAlpha(0.4),
134
+ [PlotAction.HOVER]: cesium.Color.GREEN.withAlpha(0.6),
135
+ [PlotAction.ACTIVE]: cesium.Color.GREEN.withAlpha(1)
136
+ };
137
+ return {
138
+ position,
139
+ point: {
140
+ pixelSize: 6,
141
+ color: colors[action],
142
+ disableDepthTestDistance: Number.POSITIVE_INFINITY,
143
+ outlineWidth: 1,
144
+ outlineColor: cesium.Color.WHITE.withAlpha(0.4)
145
+ }
146
+ };
147
+ }
148
+ };
149
+ }
150
+ function intervalNonclosed() {
151
+ let dragIndex = -1;
152
+ return {
153
+ diabled: ({ active, defining }) => !active || defining,
154
+ cursor: "pointer",
155
+ dragCursor: "crosshair",
156
+ format(packable) {
157
+ const _positions = packable.positions ?? [];
158
+ if (_positions.length < 2) {
159
+ return [];
160
+ }
161
+ return _positions.slice(0, _positions.length - 1).map((position, i) => {
162
+ return cesium.Cartesian3.midpoint(position, _positions[i + 1], new cesium.Cartesian3());
163
+ });
164
+ },
165
+ onDrag({ viewer, sample, packable, context, index, lockCamera, dragging }) {
166
+ lockCamera();
167
+ const position = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
168
+ if (!position) {
169
+ return;
170
+ }
171
+ const positions = [...packable.positions ?? []];
172
+ if (dragIndex === -1) {
173
+ dragIndex = index;
174
+ positions.splice(index + 1, 0, position);
175
+ } else {
176
+ positions[dragIndex + 1] = position;
177
+ }
178
+ if (!dragging) {
179
+ dragIndex = -1;
180
+ }
181
+ sample.setSample({
182
+ time: packable.time,
183
+ derivative: packable.derivative,
184
+ positions
185
+ });
186
+ },
187
+ render: ({ position, action }) => {
188
+ const colors = {
189
+ [PlotAction.IDLE]: cesium.Color.GREEN.withAlpha(0.4),
190
+ [PlotAction.HOVER]: cesium.Color.GREEN.withAlpha(0.6),
191
+ [PlotAction.ACTIVE]: cesium.Color.GREEN.withAlpha(1)
192
+ };
193
+ return {
194
+ position,
195
+ point: {
196
+ pixelSize: 6,
197
+ color: colors[action],
198
+ disableDepthTestDistance: Number.POSITIVE_INFINITY,
199
+ outlineWidth: 1,
200
+ outlineColor: cesium.Color.WHITE.withAlpha(0.4)
201
+ }
202
+ };
203
+ }
204
+ };
205
+ }
206
+ const svg = `data:image/svg+xml;utf8,${encodeURIComponent(
207
+ '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m18 9l3 3l-3 3m-3-3h6M6 9l-3 3l3 3m-3-3h6m0 6l3 3l3-3m-3-3v6m3-15l-3-3l-3 3m3-3v6"/></svg>'
208
+ )}`;
209
+ function moved() {
210
+ return {
211
+ diabled: ({ active, defining }) => !active || defining,
212
+ cursor: "pointer",
213
+ dragCursor: "crosshair",
214
+ format(packable) {
215
+ const positions = packable.positions ?? [];
216
+ if (positions.length === 0) {
217
+ return [];
218
+ } else if (positions.length === 1) {
219
+ return [positions[0]];
220
+ } else {
221
+ const center = cesium.Rectangle.center(cesium.Rectangle.fromCartesianArray(positions));
222
+ return [shared.toCartesian3(center)];
223
+ }
224
+ },
225
+ onDrag({ viewer, sample, packable, context, lockCamera, dragging }) {
226
+ dragging && lockCamera();
227
+ const startPosition = shared.canvasCoordToCartesian(context.startPosition, viewer.scene);
228
+ const endPosition = shared.canvasCoordToCartesian(context.endPosition, viewer.scene);
229
+ if (!startPosition || !endPosition) {
230
+ return;
231
+ }
232
+ const offset = cesium.Cartesian3.subtract(endPosition, startPosition, new cesium.Cartesian3());
233
+ const positions = [...packable.positions ?? []];
234
+ sample.setSample({
235
+ time: packable.time,
236
+ derivative: packable.derivative,
237
+ positions: positions.map((position) => cesium.Cartesian3.add(position, offset, new cesium.Cartesian3()))
238
+ });
239
+ },
240
+ render: ({ position, action }) => {
241
+ const colors = {
242
+ [PlotAction.IDLE]: cesium.Color.WHITE,
243
+ [PlotAction.HOVER]: cesium.Color.WHITE,
244
+ [PlotAction.ACTIVE]: cesium.Color.AQUA.withAlpha(1)
245
+ };
246
+ return {
247
+ position,
248
+ billboard: {
249
+ image: svg,
250
+ width: 20,
251
+ height: 20,
252
+ color: colors[action],
253
+ pixelOffset: new cesium.Cartesian3(0, -20),
254
+ horizontalOrigin: cesium.HorizontalOrigin.CENTER,
255
+ verticalOrigin: cesium.VerticalOrigin.BOTTOM,
256
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
257
+ }
258
+ };
259
+ }
260
+ };
261
+ }
262
+ const PLOT_BILLBOARD_SCHEME = {
263
+ scheme: {
264
+ type: "Billboard",
265
+ complete: (packable) => packable.positions.length >= 1,
266
+ skeletons: [
267
+ moved
268
+ ],
269
+ render(options) {
270
+ var _a, _b;
271
+ const { mouse, packable } = options;
272
+ const entity = ((_a = options.previous.entities) == null ? void 0 : _a[0]) ?? new cesium.Entity({
273
+ billboard: {}
274
+ });
275
+ const position = ((_b = packable.positions) == null ? void 0 : _b[0]) ?? mouse;
276
+ entity.position = new cesium.CallbackPositionProperty(() => position, true);
277
+ return {
278
+ entities: [entity]
279
+ };
280
+ }
281
+ }
282
+ };
283
+ const PLOT_LABEL_SCHEME = {
284
+ scheme: {
285
+ type: "Label",
286
+ complete: (packable) => packable.positions.length >= 1,
287
+ skeletons: [
288
+ moved
289
+ ],
290
+ render(options) {
291
+ var _a, _b;
292
+ const { mouse, packable } = options;
293
+ const entity = ((_a = options.previous.entities) == null ? void 0 : _a[0]) ?? new cesium.Entity({
294
+ label: {
295
+ text: "Label"
296
+ }
297
+ });
298
+ const position = ((_b = packable.positions) == null ? void 0 : _b[0]) ?? mouse;
299
+ entity.position = new cesium.CallbackPositionProperty(() => position, true);
300
+ return {
301
+ entities: [entity]
302
+ };
303
+ }
304
+ }
305
+ };
306
+ const PLOT_LINE_STRING_SCHEME = {
307
+ scheme: {
308
+ type: "LineString",
309
+ forceComplete: (packable) => packable.positions.length >= 2,
310
+ skeletons: [
311
+ control,
312
+ intervalNonclosed,
313
+ moved
314
+ ],
315
+ render(options) {
316
+ var _a;
317
+ const { mouse, packable } = options;
318
+ const entity = ((_a = options.previous.entities) == null ? void 0 : _a[0]) ?? new cesium.Entity({
319
+ polyline: {
320
+ width: 1
321
+ }
322
+ });
323
+ entity.polyline.positions = new cesium.CallbackProperty(() => {
324
+ const positions = [...packable.positions ?? []].concat(mouse ? [mouse] : []);
325
+ return positions.length >= 2 ? positions : [];
326
+ }, false);
327
+ return {
328
+ entities: [entity]
329
+ };
330
+ }
331
+ }
332
+ };
333
+ const PLOT_POLYGON_SCHEME = {
334
+ scheme: {
335
+ type: "Polygon",
336
+ forceComplete: (packable) => packable.positions.length >= 3,
337
+ skeletons: [
338
+ control,
339
+ interval,
340
+ moved
341
+ ],
342
+ render(options) {
343
+ var _a;
344
+ const { mouse, packable } = options;
345
+ const entity = ((_a = options.previous.entities) == null ? void 0 : _a[0]) ?? new cesium.Entity({
346
+ polyline: {
347
+ material: cesium.Color.YELLOW.withAlpha(0.5)
348
+ },
349
+ polygon: {
350
+ material: cesium.Color.YELLOW.withAlpha(0.5)
351
+ }
352
+ });
353
+ const positions = [...packable.positions ?? []];
354
+ mouse && positions.push(mouse);
355
+ if (positions.length === 2) {
356
+ entity.polygon.hierarchy = void 0;
357
+ entity.polyline.positions = new cesium.CallbackProperty(() => positions, false);
358
+ } else if (positions.length >= 3) {
359
+ entity.polyline.positions = void 0;
360
+ entity.polygon.hierarchy = new cesium.CallbackProperty(() => {
361
+ positions.push(positions[0]);
362
+ return positions.length >= 3 ? new cesium.PolygonHierarchy([...positions]) : void 0;
363
+ }, false);
364
+ } else {
365
+ entity.polygon.hierarchy = void 0;
366
+ entity.polyline.positions = void 0;
367
+ }
368
+ return {
369
+ entities: [entity]
370
+ };
371
+ }
372
+ }
373
+ };
374
+ const _PlotScheme = class _PlotScheme {
375
+ constructor(options) {
376
+ __publicField(this, "type");
377
+ /**
378
+ * 是否立即执行完成标绘操作
379
+ *
380
+ * 每次控制点发生变变化时,执行该回调函数,如果返回`true`则标绘完成
381
+ */
382
+ __publicField(this, "complete");
383
+ /**
384
+ * 双击时,是否执行完成标绘操作
385
+ */
386
+ __publicField(this, "forceComplete");
387
+ /**
388
+ * 处于定义态时的鼠标样式
389
+ * @default 'crosshair'
390
+ */
391
+ __publicField(this, "definingCursor");
392
+ /**
393
+ * 框架点渲染配置
394
+ */
395
+ __publicField(this, "skeletons");
396
+ /**
397
+ */
398
+ __publicField(this, "render");
399
+ var _a;
400
+ this.type = options.type;
401
+ this.complete = options.complete;
402
+ this.forceComplete = options.forceComplete;
403
+ this.definingCursor = options.definingCursor ?? "crosshair";
404
+ this.skeletons = ((_a = options.skeletons) == null ? void 0 : _a.map((item) => shared.isFunction(item) ? item() : item)) ?? [];
405
+ this.render = options.render;
406
+ }
407
+ static getRecordTypes() {
408
+ return [...this._record.keys()];
409
+ }
410
+ static getRecord(type) {
411
+ return _PlotScheme._record.get(type);
412
+ }
413
+ static setRecord(scheme) {
414
+ shared.assertError(!scheme.type, "`scheme.type` is required");
415
+ _PlotScheme._record.set(scheme.type, scheme);
416
+ }
417
+ /**
418
+ * 解析传入的 scheme,并返回 PlotScheme 实例
419
+ */
420
+ static resolve(maybeScheme) {
421
+ if (typeof maybeScheme === "string") {
422
+ const _scheme = _PlotScheme.getRecord(maybeScheme);
423
+ core.assert(!!_scheme, `scheme ${maybeScheme} not found`);
424
+ return _scheme;
425
+ } else if (!(maybeScheme instanceof _PlotScheme)) {
426
+ return new _PlotScheme(maybeScheme);
427
+ } else {
428
+ return maybeScheme;
429
+ }
430
+ }
431
+ };
432
+ /**
433
+ * @internal
434
+ */
435
+ __publicField(_PlotScheme, "_record", /* @__PURE__ */ new Map());
436
+ let PlotScheme = _PlotScheme;
437
+ var SampledPlotStrategy = /* @__PURE__ */ ((SampledPlotStrategy2) => {
438
+ SampledPlotStrategy2[SampledPlotStrategy2["NEAR"] = 0] = "NEAR";
439
+ SampledPlotStrategy2[SampledPlotStrategy2["CYCLE"] = 1] = "CYCLE";
440
+ SampledPlotStrategy2[SampledPlotStrategy2["STRICT"] = 2] = "STRICT";
441
+ return SampledPlotStrategy2;
442
+ })(SampledPlotStrategy || {});
443
+ const defaultInterpolationAlgorithm = (time, previous, next, proportion) => {
444
+ var _a, _b, _c;
445
+ if (proportion === 0) {
446
+ return {
447
+ time,
448
+ positions: (_a = previous.positions) == null ? void 0 : _a.map((item) => item.clone()),
449
+ derivative: previous.derivative
450
+ };
451
+ } else if (proportion === 1) {
452
+ return {
453
+ time,
454
+ positions: (_b = next.positions) == null ? void 0 : _b.map((item) => item.clone()),
455
+ derivative: previous.derivative
456
+ };
457
+ }
458
+ return {
459
+ time,
460
+ positions: (_c = next.positions) == null ? void 0 : _c.map((right, index) => {
461
+ var _a2;
462
+ const left = (_a2 = previous.positions) == null ? void 0 : _a2[index];
463
+ return !left ? right : cesium.Cartesian3.lerp(left, right, proportion, new cesium.Cartesian3());
464
+ }),
465
+ derivative: previous.derivative
466
+ };
467
+ };
468
+ const _SampledPlotProperty = class _SampledPlotProperty {
469
+ constructor(options) {
470
+ __publicField(this, "strategy");
471
+ __publicField(this, "interpolationAlgorithm");
472
+ /**
473
+ * @internal
474
+ */
475
+ __publicField(this, "_times", []);
476
+ /**
477
+ * @internal
478
+ */
479
+ __publicField(this, "_sampleds", []);
480
+ /**
481
+ * @internal
482
+ */
483
+ __publicField(this, "_derivatives", []);
484
+ /**
485
+ * @internal
486
+ */
487
+ __publicField(this, "_definitionChanged", new cesium.Event());
488
+ var _a;
489
+ this.interpolationAlgorithm = options == null ? void 0 : options.interpolationAlgorithm;
490
+ this.strategy = (options == null ? void 0 : options.strategy) ?? 0;
491
+ (_a = options == null ? void 0 : options.packables) == null ? void 0 : _a.forEach((packable) => this.setSample(packable));
492
+ if (!this._times.length) {
493
+ this.setSample({
494
+ time: cesium.JulianDate.now(),
495
+ positions: [],
496
+ derivative: void 0
497
+ });
498
+ }
499
+ }
500
+ get isConstant() {
501
+ return this._times.length === 0;
502
+ }
503
+ get definitionChanged() {
504
+ return this._definitionChanged;
505
+ }
506
+ /**
507
+ * 获取时间数组
508
+ *
509
+ * @returns 返回包含所有时间的 JulianDate 数组
510
+ */
511
+ getTimes() {
512
+ return this._times.map((t) => t.clone());
513
+ }
514
+ /**
515
+ * 根据给定的儒略日期获取时间索引范围及比例
516
+ *
517
+ * @param time 给定的儒略日期
518
+ * @returns 返回包含前一个索引、后一个索引及时间比例的对象,若不符合条件则返回undefined
519
+ * @internal
520
+ */
521
+ getIndexScope(time) {
522
+ if (!this._times.length) {
523
+ return;
524
+ }
525
+ const start = this._times[0];
526
+ const end = this._times[this._times.length - 1];
527
+ if (cesium.JulianDate.lessThan(time, start) || cesium.JulianDate.greaterThan(time, end)) {
528
+ switch (this.strategy) {
529
+ case 2: {
530
+ return;
531
+ }
532
+ case 0: {
533
+ time = cesium.JulianDate.lessThan(time, this._times[0]) ? this._times[0].clone() : this._times[this._times.length - 1].clone();
534
+ break;
535
+ }
536
+ case 1: {
537
+ const startMS = cesium.JulianDate.toDate(this._times[0]).getTime();
538
+ const endMS = cesium.JulianDate.toDate(this._times[this._times.length - 1]).getTime();
539
+ const duration = endMS - startMS;
540
+ const timeMS = cesium.JulianDate.toDate(time).getTime();
541
+ const diff = (timeMS - startMS) % duration;
542
+ const dete = new Date(startMS + diff);
543
+ time = cesium.JulianDate.fromDate(dete);
544
+ break;
545
+ }
546
+ }
547
+ }
548
+ const prevIndex = this._times.findIndex((t) => cesium.JulianDate.lessThanOrEquals(time, t));
549
+ const nextIndex = Math.min(prevIndex, this._times.length - 1);
550
+ const prevMs = cesium.JulianDate.toDate(this._times[prevIndex]).getTime();
551
+ const nextMs = cesium.JulianDate.toDate(this._times[nextIndex]).getTime();
552
+ const ms = cesium.JulianDate.toDate(time).getTime();
553
+ return {
554
+ prevIndex,
555
+ nextIndex,
556
+ proportion: (ms - prevMs) / (nextMs - prevMs) || 0
557
+ };
558
+ }
559
+ /**
560
+ * 根据给定的儒略日期(JulianDate)获取插值后的样本点数据。
561
+ *
562
+ * @param time 指定的儒略日期(JulianDate)。
563
+ * @param result 可选参数,用于存储结果的容器。如果未提供,则创建一个新的容器。
564
+ * @returns 插值后的样本点数据,存储在提供的或新创建的result容器中。
565
+ * @template D 数据类型。
566
+ */
567
+ getValue(time, result) {
568
+ var _a, _b;
569
+ result ?? (result = { time });
570
+ Object.assign(result, {
571
+ time: time.clone(),
572
+ positions: void 0,
573
+ derivative: void 0
574
+ });
575
+ if (!time) {
576
+ result.time = (_a = this._times[0]) == null ? void 0 : _a.clone();
577
+ result.positions = (_b = this._sampleds[0]) == null ? void 0 : _b.map((c) => c.clone(c));
578
+ result.derivative = this._derivatives[0];
579
+ return result;
580
+ }
581
+ const scope = this.getIndexScope(time);
582
+ if (!scope) {
583
+ return result;
584
+ }
585
+ result.time = time;
586
+ const { prevIndex, nextIndex, proportion } = scope;
587
+ const previous = {
588
+ time: this._times[prevIndex],
589
+ positions: this._sampleds[prevIndex],
590
+ derivative: this._derivatives[prevIndex]
591
+ };
592
+ const next = {
593
+ time: this._times[nextIndex],
594
+ positions: this._sampleds[nextIndex],
595
+ derivative: this._derivatives[nextIndex]
596
+ };
597
+ const packable = (this.interpolationAlgorithm || _SampledPlotProperty.defaultInterpolationAlgorithm)(time, previous, next, proportion);
598
+ Object.assign(result, packable);
599
+ return result;
600
+ }
601
+ /**
602
+ * 设置样本数据
603
+ *
604
+ * @param value 样本数据对象,包含时间、位置和导数信息
605
+ */
606
+ setSample(value) {
607
+ var _a;
608
+ const time = value.time.clone();
609
+ const positions = ((_a = value.positions) == null ? void 0 : _a.map((item) => item.clone())) ?? [];
610
+ const derivative = value.derivative;
611
+ const index = this._times.findIndex((t) => cesium.JulianDate.equals(time, t));
612
+ if (index !== -1) {
613
+ this._times[index] = time;
614
+ this._sampleds[index] = positions;
615
+ this._derivatives[index] = value.derivative;
616
+ } else if (this._times.length === 0) {
617
+ this._times[0] = time;
618
+ this._sampleds[0] = positions;
619
+ this._derivatives[0] = value.derivative;
620
+ } else if (cesium.JulianDate.lessThan(time, this._times[0])) {
621
+ this._times.splice(0, 0, time);
622
+ this._sampleds.splice(0, 0, positions);
623
+ this._derivatives.splice(0, 0, derivative);
624
+ } else if (cesium.JulianDate.greaterThan(time, this._times[this._times.length - 1])) {
625
+ this._times.push(time);
626
+ this._sampleds.push(positions);
627
+ this._derivatives.push(derivative);
628
+ }
629
+ this.definitionChanged.raiseEvent(this);
630
+ }
631
+ /**
632
+ * 设置样本数据
633
+ *
634
+ * @param values 样本数据数组,每个元素都是类型为SampledPlotPackable<D>的对象
635
+ */
636
+ setSamples(values) {
637
+ values.forEach((value) => this.setSample(value));
638
+ }
639
+ /**
640
+ * 从样本中移除指定时间点的数据
641
+ *
642
+ * @param time 需要移除的时间点,使用儒略日期表示
643
+ * @returns 如果成功移除,则返回 true;否则返回 false
644
+ */
645
+ removeSample(time) {
646
+ const index = this._times.findIndex((t) => t.equals(time));
647
+ if (index !== -1) {
648
+ this._sampleds.splice(index, 1);
649
+ this._derivatives.splice(index, 1);
650
+ const removed = this._times.splice(index, 1);
651
+ if (removed.length) {
652
+ this._definitionChanged.raiseEvent(this);
653
+ return true;
654
+ }
655
+ }
656
+ return false;
657
+ }
658
+ /**
659
+ * 从样本中移除指定时间间隔内的样本。
660
+ *
661
+ * @param interval 要移除样本的时间间隔
662
+ */
663
+ removeSamples(interval2) {
664
+ for (let i = 0; i < this._times.length; i++) {
665
+ const time = this._times[i];
666
+ cesium.TimeInterval.contains(interval2, time) && this.removeSample(time);
667
+ }
668
+ }
669
+ equals(other) {
670
+ return other === this;
671
+ }
672
+ };
673
+ __publicField(_SampledPlotProperty, "defaultInterpolationAlgorithm", defaultInterpolationAlgorithm);
674
+ let SampledPlotProperty = _SampledPlotProperty;
675
+ class Plot {
676
+ constructor(options) {
677
+ /**
678
+ * @internal
679
+ */
680
+ __publicField(this, "_definitionChanged", new cesium.Event());
681
+ __publicField(this, "time");
682
+ shared.assertError(!core.notNullish(options.scheme), "options.scheme is required");
683
+ this.id = options.id || cesium.createGuid();
684
+ shared.createCesiumAttribute(this, "disabled", !!options.disabled);
685
+ shared.createCesiumAttribute(this, "defining", true);
686
+ 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);
689
+ shared.createCesiumAttribute(this, "entities", []);
690
+ shared.createCesiumAttribute(this, "primitives", []);
691
+ shared.createCesiumAttribute(this, "groundPrimitives", []);
692
+ shared.createCesiumAttribute(this, "skeletonEntities", []);
693
+ }
694
+ get definitionChanged() {
695
+ return this._definitionChanged;
696
+ }
697
+ isDefining() {
698
+ return this.defining;
699
+ }
700
+ getEntities() {
701
+ return [...this.entities];
702
+ }
703
+ getPrimitives() {
704
+ return [...this.primitives];
705
+ }
706
+ getGroundPrimitives() {
707
+ return [...this.groundPrimitives];
708
+ }
709
+ /**
710
+ * 获取该标绘的骨架点entity数组
711
+ *
712
+ */
713
+ getSkeletonEntities() {
714
+ return [...this.skeletonEntities];
715
+ }
716
+ }
717
+ function useRender(plots, current, getCurrentTime) {
718
+ const viewer = core$1.useViewer();
719
+ const primitiveCollection = core$1.usePrimitive(new cesium.PrimitiveCollection());
720
+ const groundPrimitiveCollection = core$1.usePrimitive(new cesium.PrimitiveCollection(), { collection: "ground" });
721
+ const dataSource = core$1.useDataSource(new cesium.CustomDataSource());
722
+ const entityScope = core$1.useEntityScope({ collection: () => dataSource.value.entities });
723
+ const primitiveScope = core$1.usePrimitiveScope({ collection: () => primitiveCollection.value });
724
+ const groundPrimitiveScope = core$1.usePrimitiveScope({ collection: () => groundPrimitiveCollection.value });
725
+ const mouseCartesian = vue.shallowRef();
726
+ core$1.useScreenSpaceEventHandler(
727
+ cesium.ScreenSpaceEventType.MOUSE_MOVE,
728
+ shared.throttle((context) => {
729
+ mouseCartesian.value = shared.canvasCoordToCartesian(context == null ? void 0 : context.endPosition, viewer.value.scene);
730
+ }, 10)
731
+ );
732
+ core.watchArray(plots, (_value, _oldValue, added, removed = []) => {
733
+ removed.forEach((plot) => {
734
+ entityScope.removeWhere((item) => plot.entities.includes(item));
735
+ primitiveScope.removeWhere((item) => plot.primitives.includes(item));
736
+ groundPrimitiveScope.removeWhere((item) => plot.groundPrimitives.includes(item));
737
+ });
738
+ added.forEach((plot) => {
739
+ plot.entities.forEach((item) => entityScope.add(item));
740
+ plot.primitives.forEach((item) => primitiveScope.add(item));
741
+ plot.groundPrimitives.forEach((item) => groundPrimitiveScope.add(item));
742
+ });
743
+ }, {
744
+ immediate: true
745
+ });
746
+ core$1.useCesiumEventListener(
747
+ () => plots.value.map((item) => item.definitionChanged),
748
+ (_scope, key, newValue, oldValue) => {
749
+ if (key === "entities") {
750
+ const { added, removed } = shared.arrayDifference(newValue, oldValue);
751
+ added.forEach((item) => entityScope.add(item));
752
+ removed.forEach((item) => entityScope.remove(item));
753
+ } else if (key === "primitives") {
754
+ const { added, removed } = shared.arrayDifference(newValue, oldValue);
755
+ added.forEach((item) => primitiveScope.add(item));
756
+ removed.forEach((item) => primitiveScope.remove(item));
757
+ } else if (key === "groundPrimitives") {
758
+ const { added, removed } = shared.arrayDifference(newValue, oldValue);
759
+ added.forEach((item) => groundPrimitiveScope.add(item));
760
+ removed.forEach((item) => groundPrimitiveScope.remove(item));
761
+ }
762
+ }
763
+ );
764
+ const update = shared.throttle(async (plot) => {
765
+ var _a, _b;
766
+ const reslut = await ((_b = (_a = plot.scheme).render) == null ? void 0 : _b.call(_a, {
767
+ packable: plot.sample.getValue(getCurrentTime()),
768
+ mouse: plot.defining ? mouseCartesian.value : void 0,
769
+ defining: plot.defining,
770
+ previous: {
771
+ entities: plot.entities,
772
+ primitives: plot.primitives,
773
+ groundPrimitives: plot.groundPrimitives
774
+ }
775
+ }));
776
+ plot.entities = (reslut == null ? void 0 : reslut.entities) ?? [];
777
+ plot.primitives = (reslut == null ? void 0 : reslut.primitives) ?? [];
778
+ plot.groundPrimitives = (reslut == null ? void 0 : reslut.groundPrimitives) ?? [];
779
+ }, 1);
780
+ vue.watch(current, (plot, previous) => {
781
+ previous && update(previous);
782
+ });
783
+ core$1.useCesiumEventListener(
784
+ () => plots.value.map((item) => item.definitionChanged),
785
+ (plot, key) => {
786
+ if (["disabled", "defining", "scheme", "sample", "time"].includes(key)) {
787
+ update(plot);
788
+ }
789
+ }
790
+ );
791
+ vue.watch(mouseCartesian, () => {
792
+ plots.value.forEach((plot) => plot.defining && update(plot));
793
+ });
794
+ return {
795
+ primitives: vue.computed(() => Array.from(primitiveScope.scope)),
796
+ groundPrimitives: vue.computed(() => Array.from(primitiveScope.scope)),
797
+ entities: vue.computed(() => Array.from(entityScope.scope))
798
+ };
799
+ }
800
+ function useSampled(current, getCurrentTime) {
801
+ const viewer = core$1.useViewer();
802
+ const doubleClicking = vue.ref(false);
803
+ const packable = vue.computed(() => {
804
+ var _a;
805
+ return (_a = current.value) == null ? void 0 : _a.sample.getValue(getCurrentTime());
806
+ });
807
+ core$1.useScreenSpaceEventHandler(
808
+ cesium.ScreenSpaceEventType.LEFT_CLICK,
809
+ async (ctx) => {
810
+ var _a, _b;
811
+ await core.promiseTimeout(1);
812
+ if (!current.value || !packable.value) {
813
+ return;
814
+ }
815
+ if (doubleClicking.value) {
816
+ return;
817
+ }
818
+ const { scheme, defining, sample } = current.value;
819
+ if (!defining) {
820
+ return;
821
+ }
822
+ const position = shared.canvasCoordToCartesian(ctx.position, viewer.value.scene);
823
+ if (!position) {
824
+ return;
825
+ }
826
+ (_a = packable.value).positions ?? (_a.positions = []);
827
+ packable.value.positions.push(position);
828
+ sample.setSample(packable.value);
829
+ const completed = (_b = scheme.complete) == null ? void 0 : _b.call(scheme, packable.value);
830
+ completed && (current.value.defining = false);
831
+ }
832
+ );
833
+ core$1.useScreenSpaceEventHandler(
834
+ cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
835
+ async (ctx) => {
836
+ var _a;
837
+ if (!current.value || !packable.value) {
838
+ return;
839
+ }
840
+ doubleClicking.value = true;
841
+ await core.promiseTimeout(2);
842
+ doubleClicking.value = false;
843
+ const { scheme, defining } = current.value;
844
+ if (!defining) {
845
+ return;
846
+ }
847
+ const position = shared.canvasCoordToCartesian(ctx.position, viewer.value.scene);
848
+ if (!position) {
849
+ return;
850
+ }
851
+ const completed = (_a = scheme.forceComplete) == null ? void 0 : _a.call(scheme, packable.value);
852
+ completed && (current.value.defining = false);
853
+ }
854
+ );
855
+ core$1.useScreenSpaceEventHandler(
856
+ cesium.ScreenSpaceEventType.RIGHT_CLICK,
857
+ async () => {
858
+ var _a;
859
+ if (!current.value || !packable.value) {
860
+ return;
861
+ }
862
+ const { defining, sample } = current.value;
863
+ if (!defining) {
864
+ return;
865
+ }
866
+ (_a = packable.value).positions ?? (_a.positions = []);
867
+ if (packable.value.positions.length === 0) {
868
+ return;
869
+ }
870
+ packable.value.positions.splice(packable.value.positions.length - 1, 1);
871
+ sample.setSample(packable.value);
872
+ }
873
+ );
874
+ const definingCursorCss = vue.ref();
875
+ const setDefiningCursorCss = () => {
876
+ var _a, _b;
877
+ if (!((_a = current.value) == null ? void 0 : _a.defining)) {
878
+ if (definingCursorCss.value) {
879
+ definingCursorCss.value = void 0;
880
+ viewer.value.container.parentElement.style.removeProperty("cursor");
881
+ }
882
+ } else {
883
+ const definingCursor = current.value.scheme.definingCursor;
884
+ definingCursorCss.value = shared.isFunction(definingCursor) ? definingCursor(packable.value) : vue.toValue(definingCursor);
885
+ if (definingCursorCss.value) {
886
+ (_b = viewer.value) == null ? void 0 : _b.container.parentElement.style.setProperty("cursor", definingCursorCss.value);
887
+ }
888
+ }
889
+ };
890
+ core$1.useCesiumEventListener(() => {
891
+ var _a;
892
+ return (_a = current.value) == null ? void 0 : _a.definitionChanged;
893
+ }, (plot, key) => {
894
+ if (key === "defining" || key === "sample") {
895
+ setDefiningCursorCss();
896
+ }
897
+ });
898
+ vue.watch(current, () => setDefiningCursorCss());
899
+ }
900
+ class PlotSkeletonEntity extends cesium.Entity {
901
+ constructor(options) {
902
+ super(options);
903
+ }
904
+ }
905
+ function useSkeleton(plots, current, getCurrentTime) {
906
+ const viewer = core$1.useViewer();
907
+ const dataSource = core$1.useDataSource(new cesium.CustomDataSource());
908
+ const entityScope = core$1.useEntityScope({ collection: () => dataSource.value.entities });
909
+ const hoverEntity = vue.shallowRef();
910
+ const activeEntity = vue.shallowRef();
911
+ const getPointAction = (entity) => {
912
+ var _a, _b;
913
+ if (!entity) {
914
+ return PlotAction.IDLE;
915
+ }
916
+ return ((_a = activeEntity.value) == null ? void 0 : _a.id) === entity.id ? PlotAction.ACTIVE : ((_b = hoverEntity.value) == null ? void 0 : _b.id) === entity.id ? PlotAction.HOVER : PlotAction.IDLE;
917
+ };
918
+ const update = shared.throttle((plot, destroyed) => {
919
+ const oldEntities = plot.getSkeletonEntities();
920
+ const entities = [];
921
+ if (destroyed || plot.disabled) {
922
+ plot.skeletonEntities = [];
923
+ } else {
924
+ const packable = plot.sample.getValue(getCurrentTime());
925
+ const defining = plot.defining;
926
+ const active = current.value === plot;
927
+ const skeletons = plot.scheme.skeletons;
928
+ skeletons.forEach((skeleton) => {
929
+ var _a;
930
+ const diabled = shared.isFunction(skeleton.diabled) ? skeleton.diabled({ active, defining }) : skeleton.diabled;
931
+ if (diabled) {
932
+ return;
933
+ }
934
+ const positions = ((_a = skeleton.format) == null ? void 0 : _a.call(skeleton, packable)) ?? (packable == null ? void 0 : packable.positions) ?? [];
935
+ positions.forEach((position, index) => {
936
+ var _a2;
937
+ let entity = oldEntities.find((item) => item.index === index && item.skeleton === skeleton);
938
+ const options = (_a2 = skeleton.render) == null ? void 0 : _a2.call(skeleton, {
939
+ defining,
940
+ active,
941
+ index,
942
+ packable,
943
+ positions,
944
+ position,
945
+ action: getPointAction(entity)
946
+ });
947
+ const merge = new PlotSkeletonEntity(options ?? {});
948
+ if (entity) {
949
+ merge.propertyNames.forEach((key) => {
950
+ if (key !== "id") {
951
+ entity[key] = merge[key];
952
+ }
953
+ });
954
+ } else {
955
+ entity = merge;
956
+ }
957
+ entity.plot = plot;
958
+ entity.skeleton = skeleton;
959
+ entity.index = index;
960
+ entities.push(entity);
961
+ });
962
+ });
963
+ }
964
+ plot.skeletonEntities = entities;
965
+ }, 1);
966
+ core$1.useGraphicDrag({
967
+ cursor: (pick) => {
968
+ var _a;
969
+ if (!((_a = current.value) == null ? void 0 : _a.defining) && entityScope.scope.has(pick.id)) {
970
+ const skeleton = pick.id.skeleton;
971
+ return shared.isFunction(skeleton == null ? void 0 : skeleton.cursor) ? skeleton.cursor(pick) : vue.toValue(skeleton == null ? void 0 : skeleton.cursor);
972
+ }
973
+ },
974
+ dragCursor: (pick) => {
975
+ var _a;
976
+ if (!((_a = current.value) == null ? void 0 : _a.defining) && entityScope.scope.has(pick.id)) {
977
+ const skeleton = pick.id.skeleton;
978
+ return shared.isFunction(skeleton == null ? void 0 : skeleton.dragCursor) ? skeleton.dragCursor(pick) : vue.toValue(skeleton == null ? void 0 : skeleton.dragCursor);
979
+ }
980
+ },
981
+ listener: (params) => {
982
+ var _a;
983
+ if (params.pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(params.pick.id)) {
984
+ const entity = params.pick.id;
985
+ const plot = entity.plot;
986
+ if (plot.defining) {
987
+ return;
988
+ }
989
+ activeEntity.value = entity;
990
+ const skeleton = entity.skeleton;
991
+ const index = entity.index;
992
+ const packable = plot.sample.getValue(getCurrentTime());
993
+ (_a = skeleton.onDrag) == null ? void 0 : _a.call(skeleton, {
994
+ viewer: viewer.value,
995
+ sample: plot.sample,
996
+ packable,
997
+ active: current.value === plot,
998
+ index,
999
+ context: params.context,
1000
+ dragging: params.dragging,
1001
+ lockCamera: params.lockCamera
1002
+ });
1003
+ } else {
1004
+ activeEntity.value = void 0;
1005
+ }
1006
+ }
1007
+ });
1008
+ core.onKeyStroke((keyEvent) => {
1009
+ var _a;
1010
+ if (activeEntity.value) {
1011
+ const entity = activeEntity.value;
1012
+ const plot = entity.plot;
1013
+ const skeleton = entity.skeleton;
1014
+ const index = entity.index;
1015
+ const packable = plot.sample.getValue(getCurrentTime());
1016
+ (_a = skeleton.onKeyPressed) == null ? void 0 : _a.call(skeleton, {
1017
+ viewer: viewer.value,
1018
+ sample: plot.sample,
1019
+ packable,
1020
+ index,
1021
+ keyEvent
1022
+ });
1023
+ }
1024
+ });
1025
+ core$1.useGraphicHover({
1026
+ listener: ({ hovering, pick }) => {
1027
+ if (hovering && pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
1028
+ const entity = pick.id;
1029
+ hoverEntity.value = entity;
1030
+ } else {
1031
+ hoverEntity.value = void 0;
1032
+ }
1033
+ }
1034
+ });
1035
+ core$1.useGraphicLeftClick({
1036
+ listener: ({ context, pick }) => {
1037
+ var _a;
1038
+ if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
1039
+ const entity = pick.id;
1040
+ activeEntity.value = entity;
1041
+ const plot = entity.plot;
1042
+ const skeleton = entity.skeleton;
1043
+ const index = entity.index;
1044
+ const packable = plot.sample.getValue(getCurrentTime());
1045
+ (_a = skeleton.onLeftClick) == null ? void 0 : _a.call(skeleton, {
1046
+ viewer: viewer.value,
1047
+ sample: plot.sample,
1048
+ packable,
1049
+ active: current.value === plot,
1050
+ defining: plot.defining,
1051
+ index,
1052
+ context
1053
+ });
1054
+ } else {
1055
+ activeEntity.value = void 0;
1056
+ }
1057
+ }
1058
+ });
1059
+ core.watchArray(plots, (value, oldValue, added, removed = []) => {
1060
+ added.forEach((plot) => update(plot));
1061
+ removed.forEach((plot) => update(plot, true));
1062
+ });
1063
+ core$1.useCesiumEventListener(() => plots.value.map((plot) => plot.definitionChanged), (plot, key, newValue, oldValue) => {
1064
+ if (["disabled", "defining", "scheme", "sample", "time"].includes(key)) {
1065
+ update(plot);
1066
+ }
1067
+ if (key === "skeletonEntities") {
1068
+ const { added, removed } = shared.arrayDifference(newValue, oldValue);
1069
+ added.forEach((item) => entityScope.add(item));
1070
+ removed.forEach((item) => entityScope.remove(item));
1071
+ }
1072
+ });
1073
+ vue.watch(current, (plot, previous) => {
1074
+ plot && update(plot);
1075
+ setTimeout(() => {
1076
+ previous && update(previous);
1077
+ }, 2);
1078
+ });
1079
+ return {
1080
+ dataSource
1081
+ };
1082
+ }
1083
+ function usePlot(options) {
1084
+ const time = (options == null ? void 0 : options.time) || vue.shallowRef();
1085
+ const viewer = useViewer.useViewer();
1086
+ const getCurrentTime = () => {
1087
+ var _a, _b, _c;
1088
+ return ((_a = time.value) == null ? void 0 : _a.clone()) || ((_c = (_b = viewer.value) == null ? void 0 : _b.clock.currentTime) == null ? void 0 : _c.clone()) || cesium.JulianDate.now();
1089
+ };
1090
+ const collection = vue.shallowReactive(/* @__PURE__ */ new Set());
1091
+ const plots = vue.computed(() => Array.from(collection));
1092
+ const current = vue.shallowRef();
1093
+ const packable = vue.shallowRef();
1094
+ core$1.useCesiumEventListener([
1095
+ () => {
1096
+ var _a;
1097
+ return (_a = current.value) == null ? void 0 : _a.sample.definitionChanged;
1098
+ }
1099
+ ], () => {
1100
+ var _a;
1101
+ packable.value = (_a = current.value) == null ? void 0 : _a.sample.getValue(getCurrentTime());
1102
+ });
1103
+ useSampled(current, getCurrentTime);
1104
+ useRender(plots, current, getCurrentTime);
1105
+ useSkeleton(plots, current, getCurrentTime);
1106
+ core$1.useScreenSpaceEventHandler(cesium.ScreenSpaceEventType.LEFT_CLICK, (data) => {
1107
+ var _a, _b, _c;
1108
+ if ((_a = current.value) == null ? void 0 : _a.defining) {
1109
+ return;
1110
+ }
1111
+ const pick = (_b = viewer.value) == null ? void 0 : _b.scene.pick(data.position.clone());
1112
+ if (((_c = pick == null ? void 0 : pick.id) == null ? void 0 : _c.plot) instanceof Plot) {
1113
+ return;
1114
+ }
1115
+ if (!pick) {
1116
+ current.value = void 0;
1117
+ return;
1118
+ }
1119
+ current.value = plots.value.find((plot) => shared.pickHitGraphic(pick, [...plot.entities, ...plot.primitives, ...plot.groundPrimitives]));
1120
+ });
1121
+ let operateResolve;
1122
+ let operateReject;
1123
+ vue.watch(current, (plot, previous) => {
1124
+ var _a, _b;
1125
+ if (previous) {
1126
+ if (previous.defining) {
1127
+ const packable2 = previous.sample.getValue(getCurrentTime());
1128
+ const completed = (_b = (_a = previous.scheme).forceComplete) == null ? void 0 : _b.call(_a, packable2);
1129
+ if (completed) {
1130
+ previous.defining = false;
1131
+ operateResolve == null ? void 0 : operateResolve(previous);
1132
+ } else {
1133
+ collection.delete(previous);
1134
+ }
1135
+ }
1136
+ }
1137
+ });
1138
+ const operate = async (plot) => {
1139
+ return new Promise((resolve, reject) => {
1140
+ operateResolve = resolve;
1141
+ operateReject = reject;
1142
+ const _plot = plot instanceof Plot ? plot : new Plot(plot);
1143
+ if (!collection.has(_plot)) {
1144
+ collection.add(_plot);
1145
+ }
1146
+ current.value = _plot;
1147
+ return resolve(_plot);
1148
+ });
1149
+ };
1150
+ const remove = (plot) => {
1151
+ if (plot === current.value) {
1152
+ current.value = void 0;
1153
+ }
1154
+ if (collection.has(plot)) {
1155
+ collection.delete(plot);
1156
+ return true;
1157
+ }
1158
+ return false;
1159
+ };
1160
+ return {
1161
+ plots,
1162
+ time,
1163
+ operate,
1164
+ remove,
1165
+ cancel: operateReject
1166
+ };
1167
+ }
1168
+ exports.PLOT_BILLBOARD_SCHEME = PLOT_BILLBOARD_SCHEME;
1169
+ exports.PLOT_LABEL_SCHEME = PLOT_LABEL_SCHEME;
1170
+ exports.PLOT_LINE_STRING_SCHEME = PLOT_LINE_STRING_SCHEME;
1171
+ exports.PLOT_POLYGON_SCHEME = PLOT_POLYGON_SCHEME;
1172
+ exports.Plot = Plot;
1173
+ exports.PlotScheme = PlotScheme;
1174
+ exports.SampledPlotProperty = SampledPlotProperty;
1175
+ exports.SampledPlotStrategy = SampledPlotStrategy;
1176
+ exports.usePlot = usePlot;
1177
+ //# sourceMappingURL=index.cjs.map