@vesium/plot 1.0.1-beta.68 → 1.0.1-beta.71
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/README.md +1 -1
- package/dist/index.cjs +25 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +15 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.iife.js +25 -17
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +23 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://github.com/vesiumjs/vesium/raw/main/assets/logo.svg" align="center" width="15%" />
|
|
2
|
+
<img src="https://github.com/vesiumjs/vesium/raw/main/assets/logo.svg" align="center" width="15%" alt="Vesium Logo" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -279,7 +280,7 @@ var SampledPlotProperty = class SampledPlotProperty {
|
|
|
279
280
|
* @param value 样本数据对象,包含时间、位置和导数信息
|
|
280
281
|
*/
|
|
281
282
|
setSample(value) {
|
|
282
|
-
const time = value.time?.clone() ?? this._times[0]
|
|
283
|
+
const time = value.time?.clone() ?? this._times[0]?.clone() ?? new cesium.JulianDate(0, 0);
|
|
283
284
|
const positions = value.positions?.map((item) => item.clone()) ?? [];
|
|
284
285
|
const derivative = value.derivative;
|
|
285
286
|
const index = this._times.findIndex((t) => cesium.JulianDate.equals(time, t));
|
|
@@ -358,10 +359,11 @@ var PlotFeature = class {
|
|
|
358
359
|
this._id = id || (0, cesium.createGuid)();
|
|
359
360
|
this._scheme = PlotScheme.resolve(options.scheme);
|
|
360
361
|
this._definitionChanged = new cesium.Event();
|
|
361
|
-
this._defining = true;
|
|
362
362
|
this._disabled = disabled;
|
|
363
363
|
this._sampled = sampled instanceof SampledPlotProperty ? sampled : new SampledPlotProperty(sampled);
|
|
364
364
|
this._sampled.definitionChanged.addEventListener((property) => this._definitionChanged.raiseEvent(this, "sampled", property, property), this);
|
|
365
|
+
const packable = this._sampled.getValue();
|
|
366
|
+
this._defining = !(packable.positions && packable.positions.length > 0);
|
|
365
367
|
const init = this._scheme.initRender?.() ?? {};
|
|
366
368
|
this._entities = [...init.entities ?? []];
|
|
367
369
|
this._primitives = [...init.primitives ?? []];
|
|
@@ -419,7 +421,10 @@ var PlotFeature = class {
|
|
|
419
421
|
return this._disabled;
|
|
420
422
|
}
|
|
421
423
|
set disabled(value) {
|
|
422
|
-
this.
|
|
424
|
+
if (this._disabled !== value) {
|
|
425
|
+
this._definitionChanged.raiseEvent(this, "disabled", value, this._disabled);
|
|
426
|
+
this._disabled = value;
|
|
427
|
+
}
|
|
423
428
|
}
|
|
424
429
|
/**
|
|
425
430
|
* @internal
|
|
@@ -710,17 +715,18 @@ function useSkeleton(plots, current, getCurrentTime) {
|
|
|
710
715
|
onCleanup(graphicEvent.add("global", "DRAG", ({ event, pick, dragging, lockCamera }) => {
|
|
711
716
|
if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
|
|
712
717
|
const entity = pick.id;
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
718
|
+
const feature = entity.plot;
|
|
719
|
+
if (feature.defining) return;
|
|
715
720
|
activeEntity.value = entity;
|
|
716
721
|
const skeleton = entity.skeleton;
|
|
717
722
|
const index = entity.index;
|
|
718
|
-
const packable =
|
|
723
|
+
const packable = feature.sampled.getValue(getCurrentTime());
|
|
719
724
|
skeleton.onDrag?.({
|
|
720
725
|
viewer: viewer.value,
|
|
721
|
-
|
|
726
|
+
feature,
|
|
727
|
+
sampled: feature.sampled,
|
|
722
728
|
packable,
|
|
723
|
-
active: current.value ===
|
|
729
|
+
active: current.value === feature,
|
|
724
730
|
index,
|
|
725
731
|
event,
|
|
726
732
|
dragging,
|
|
@@ -745,13 +751,14 @@ function useSkeleton(plots, current, getCurrentTime) {
|
|
|
745
751
|
(0, _vueuse_core.onKeyStroke)((keyEvent) => {
|
|
746
752
|
if (activeEntity.value) {
|
|
747
753
|
const entity = activeEntity.value;
|
|
748
|
-
const
|
|
754
|
+
const feature = entity.plot;
|
|
749
755
|
const skeleton = entity.skeleton;
|
|
750
756
|
const index = entity.index;
|
|
751
|
-
const packable =
|
|
757
|
+
const packable = feature.sampled.getValue(getCurrentTime());
|
|
752
758
|
skeleton.onKeyPressed?.({
|
|
753
759
|
viewer: viewer.value,
|
|
754
|
-
|
|
760
|
+
feature,
|
|
761
|
+
sampled: feature.sampled,
|
|
755
762
|
packable,
|
|
756
763
|
index,
|
|
757
764
|
keyEvent
|
|
@@ -769,16 +776,17 @@ function useSkeleton(plots, current, getCurrentTime) {
|
|
|
769
776
|
if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
|
|
770
777
|
const entity = pick.id;
|
|
771
778
|
activeEntity.value = entity;
|
|
772
|
-
const
|
|
779
|
+
const feature = entity.plot;
|
|
773
780
|
const skeleton = entity.skeleton;
|
|
774
781
|
const index = entity.index;
|
|
775
|
-
const packable =
|
|
782
|
+
const packable = feature.sampled.getValue(getCurrentTime());
|
|
776
783
|
skeleton.onLeftClick?.({
|
|
777
784
|
viewer: viewer.value,
|
|
778
|
-
|
|
785
|
+
feature,
|
|
786
|
+
sampled: feature.sampled,
|
|
779
787
|
packable,
|
|
780
|
-
active: current.value ===
|
|
781
|
-
defining:
|
|
788
|
+
active: current.value === feature,
|
|
789
|
+
defining: feature.defining,
|
|
782
790
|
index,
|
|
783
791
|
event
|
|
784
792
|
});
|