cesium-pocket 0.4.0-alpha → 0.4.1-alpha
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/{CircleDrawer-DotSQduG.js → CircleDrawer-49m1zEV5.js} +11 -8
- package/{PolygonGaguger-DMt3tXsR.js → PolygonGaguger-Clq33-3p.js} +1 -1
- package/drawer.js +1 -1
- package/gauger.js +1 -1
- package/index.css +1 -1
- package/index.d.ts +2 -1
- package/index.js +1270 -946
- package/package.json +2 -2
- package/src/czml/player/CzmlManager.d.ts +39 -0
- package/src/czml/util.d.ts +10 -0
- package/src/drawer/CircleDrawer.d.ts +2 -1
- package/src/drawer/DataCenter.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomDataSource as b, Cartesian3 as r, JulianDate as I, defined as h, HeightReference as m, Color as u, EntityCollection as F, ScreenSpaceEventType as c, ConstantPositionProperty as E, ScreenSpaceEventHandler as y, VerticalOrigin as B, PolylineDashMaterialProperty as M, CallbackProperty as D, PolygonHierarchy as C, Cartographic as v, Transforms as
|
|
1
|
+
import { CustomDataSource as b, Cartesian3 as r, JulianDate as I, defined as h, HeightReference as m, Color as u, EntityCollection as F, ScreenSpaceEventType as c, ConstantPositionProperty as E, ScreenSpaceEventHandler as y, VerticalOrigin as B, PolylineDashMaterialProperty as M, CallbackProperty as D, PolygonHierarchy as C, Cartographic as v, Transforms as L, Matrix4 as p, EllipsoidGeodesic as R } from "cesium";
|
|
2
2
|
import { toRaw as d } from "vue";
|
|
3
3
|
const l = {
|
|
4
4
|
STOPED: Symbol("STOPED"),
|
|
@@ -162,8 +162,8 @@ class O extends w {
|
|
|
162
162
|
if (l.DRAWABLE == super.getStatus()) {
|
|
163
163
|
let s = this.viewer.camera.getPickRay(a.position), n = this.viewer.scene.globe.pick(s, this.viewer.scene);
|
|
164
164
|
if (h(n)) {
|
|
165
|
-
let
|
|
166
|
-
this.mainData.push(n), this.pointCollection.add(
|
|
165
|
+
let P = this.addPointFun(n);
|
|
166
|
+
this.mainData.push(n), this.pointCollection.add(P), this.afterAddPointFun && this.afterAddPointFun(n);
|
|
167
167
|
}
|
|
168
168
|
} else if (l.DELETABLE == super.getStatus()) {
|
|
169
169
|
const s = this.viewer.scene.pick(a.position);
|
|
@@ -432,8 +432,8 @@ class x extends w {
|
|
|
432
432
|
}
|
|
433
433
|
initMainData() {
|
|
434
434
|
if (this.firstPoint && this.endPoint) {
|
|
435
|
-
const e = v.fromCartesian(this.firstPoint), t = e.longitude, i = e.latitude, a = v.fromCartesian(this.endPoint), s = a.longitude, n = a.latitude,
|
|
436
|
-
this.mainData[0] = this.firstPoint, this.mainData[1] =
|
|
435
|
+
const e = v.fromCartesian(this.firstPoint), t = e.longitude, i = e.latitude, a = v.fromCartesian(this.endPoint), s = a.longitude, n = a.latitude, P = r.fromRadians(t, n), S = r.fromRadians(s, i);
|
|
436
|
+
this.mainData[0] = this.firstPoint, this.mainData[1] = P, this.mainData[2] = this.endPoint, this.mainData[3] = S;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
//创建主线数据
|
|
@@ -505,13 +505,16 @@ class Q extends w {
|
|
|
505
505
|
super.drawableStatus(), this.handler || (this.handler = new y(this.viewer.scene.canvas)), this.circle_L_ClickEvent(), this.circle_L_DownEvent(), this.circle_L_UpEvent(), this.circle_moveEvent();
|
|
506
506
|
}
|
|
507
507
|
getEntity() {
|
|
508
|
-
return this.
|
|
508
|
+
return this.ellipseEntity;
|
|
509
|
+
}
|
|
510
|
+
getPositions() {
|
|
511
|
+
return this.refreshPositionsData();
|
|
509
512
|
}
|
|
510
513
|
clearAll() {
|
|
511
514
|
this.clearAllData(), this.firstPoint = new r(), this.endPoint = new r(), this.handler && (this.handler = null), this.ellipseEntity && this.viewer.entities.removeById(this.ellipseEntity.id);
|
|
512
515
|
}
|
|
513
516
|
setAngle() {
|
|
514
|
-
const e =
|
|
517
|
+
const e = L.eastNorthUpToFixedFrame(this.firstPoint.clone()), t = p.inverse(e, new p()), i = p.multiplyByPoint(t, this.endPoint.clone(), new r());
|
|
515
518
|
this.angle = Math.atan2(i.x, i.y);
|
|
516
519
|
}
|
|
517
520
|
circleMove(e, t) {
|
|
@@ -529,7 +532,7 @@ class Q extends w {
|
|
|
529
532
|
this.distance * Math.cos(this.angle),
|
|
530
533
|
0
|
|
531
534
|
// 保持水平,如果希望保持高度则设为 localEdge.z
|
|
532
|
-
), t =
|
|
535
|
+
), t = L.eastNorthUpToFixedFrame(this.firstPoint), i = p.multiplyByPointAsVector(t, e, new r());
|
|
533
536
|
this.endPoint = r.add(this.firstPoint, i, new r());
|
|
534
537
|
}
|
|
535
538
|
countDistance() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cartographic as G, EllipsoidGeodesic as R, Cartesian3 as b, BoundingSphere as N, Transforms as Y, Matrix4 as B, CustomDataSource as L, ConstantPositionProperty as d, ConstantProperty as u, Color as o, Cartesian2 as I, VerticalOrigin as S, HorizontalOrigin as f, LabelStyle as C, Math as O } from "cesium";
|
|
2
|
-
import { a as y, R as j, P as U, C as P, b as W } from "./CircleDrawer-
|
|
2
|
+
import { a as y, R as j, P as U, C as P, b as W } from "./CircleDrawer-49m1zEV5.js";
|
|
3
3
|
const A = (r, t) => {
|
|
4
4
|
const l = G.fromCartesian(r), e = G.fromCartesian(t);
|
|
5
5
|
return new R(l, e).surfaceDistance;
|
package/drawer.js
CHANGED
package/gauger.js
CHANGED
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cp-porket-compass[data-v-
|
|
1
|
+
.cp-porket-compass[data-v-e318f85e]{position:absolute;z-index:1000;width:100px;height:100px;cursor:pointer}.cp-porket-ruler[data-v-8e93d8ff]{z-index:1000;width:100px;height:20px;text-align:center;padding-top:2px;font-size:12px;color:#ebebeb}.cp-porket-ruler-line[data-v-8e93d8ff]{width:100px;height:5px;border-bottom:1px solid #eeeeee;border-left:2px solid #eeeeee;border-right:2px solid #eeeeee;margin-top:-2px}.cp-porket-coord[data-v-064db41e]{z-index:1000;width:200px;height:26px;text-align:center;font-size:12px;display:flex;justify-content:space-around;color:#eee}.cp-overlay[data-v-2b05e7d5]{position:absolute;z-index:100;font-size:12px}.cp-overlay-close[data-v-2b05e7d5]{position:absolute;right:0;top:0;z-index:10;width:30px;height:30px;line-height:30px;text-align:center;cursor:pointer}.cp-overlay-close-img[data-v-2b05e7d5]{width:30px;height:30px;color:#fff}.cesium-html-marker[data-v-da185123]{pointer-events:auto;z-index:1000}.pin-container[data-v-da185123]{position:absolute;z-index:20;color:#eee;font-size:12px;text-shadow:-1px -1px 0 #06012c,1px -1px 0 #06012c,-1px 1px 0 #06012c,1px 1px 0 #06012c;margin:0;padding:5px;border-radius:4px}.cp-layersmap[data-v-3c9f5494]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-layersmap-header[data-v-3c9f5494]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-layersmap-main[data-v-3c9f5494]{display:flex;justify-content:space-around;padding-right:2px}.cp-layersmap-layer[data-v-3c9f5494]{width:60px;height:60px;position:relative;margin-left:2px;margin-top:2px;margin-bottom:2px;cursor:pointer}.cp-layersmap-layer-header[data-v-3c9f5494]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-layer-image[data-v-3c9f5494]{width:60px;height:60px}.cp-layersmap-layer-footer[data-v-3c9f5494]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-layersmap-active[data-v-3c9f5494]{background-color:#0047e0cc}.cp-tianmap[data-v-014b2f5e]{position:absolute;z-index:10;color:#eee;background-color:#000c;border:1px solid rgb(61,64,105);border-radius:4px}.cp-tianmap-header[data-v-014b2f5e]{height:24px;line-height:20px;font-size:12px;background-color:#000c;display:flex;justify-content:space-around;align-items:center}.cp-tianmap-main[data-v-014b2f5e]{display:flex;justify-content:space-around;padding-right:4px}.cp-tianmap-layer[data-v-014b2f5e]{width:60px;height:60px;position:relative;margin-left:4px;margin-top:4px;margin-bottom:4px;cursor:pointer}.cp-tianmap-layer-header[data-v-014b2f5e]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-tianmap-layer-image[data-v-014b2f5e]{width:60px;height:60px}.cp-tianmap-layer-footer[data-v-014b2f5e]{position:absolute;z-index:1;width:100%;height:16px;line-height:16px;text-align:center;font-size:12px;background-color:#4449}.cp-tianmap-active[data-v-014b2f5e]{background-color:#00c6e0cc}.czml-config[data-v-020c9b69]{position:fixed;left:0;bottom:60px;z-index:100;width:60x;background-color:#0006;border-top:1px solid rgb(80,80,80);border-right:1px solid rgb(80,80,80);border-radius:4px;padding:6px;font-size:12px;color:#ccc}.czml-config img[data-v-020c9b69]{width:18px;margin:6px}.czmlBar[data-v-020c9b69]{position:fixed;bottom:0;z-index:100;height:60px;width:100%;display:flex;justify-content:space-between;flex-direction:row;background-color:#0006;font-size:12px;color:#ccc}.bar-control[data-v-020c9b69]{width:220px;-webkit-user-select:none;user-select:none}.control-btns[data-v-020c9b69]{display:flex;justify-content:space-around;align-items:center;padding-top:8px}.control-btns div[data-v-020c9b69]{width:22px;height:22px;border-radius:2px;display:flex;justify-content:center;align-items:center;background-color:#ffffff4d}.control-btns img[data-v-020c9b69]{width:14px}.control-bottom[data-v-020c9b69]{height:30px;display:flex;justify-content:space-between;align-items:center;padding:0 10px;color:#ff0}.bar-timeline[data-v-020c9b69]{flex:1 1 auto;padding:10px;position:relative}.timeline-left[data-v-020c9b69]{position:absolute;top:6px;left:10px}.timeline-right[data-v-020c9b69]{position:absolute;top:6px;right:10px}.timeline-ruler[data-v-020c9b69]{position:relative;height:26px;margin-top:20px;margin-left:0;border-bottom:1px;border-bottom-style:solid;border-bottom-color:gray}.ruler-label[data-v-020c9b69]{position:absolute;top:-30px;transform:translate(-25%)}.tick[data-v-020c9b69]{position:absolute;bottom:0;width:0;height:6px;border-left:1px solid rgba(170,180,190,.45);font-size:10px}.grabbing[data-v-020c9b69]{cursor:grabbing}.tick-major[data-v-020c9b69]{height:12px;border-left:1px solid rgba(170,180,190,.45)}.playhead[data-v-020c9b69]{position:absolute;top:0;bottom:0;width:0;z-index:5;transform:translate(-50%);pointer-events:none}.playhead__tri[data-v-020c9b69]{position:absolute;top:0;left:70%;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid #ffff00;transform:translate(-50%);filter:drop-shadow(0 1px 1px #ffff00)}.playhead__line[data-v-020c9b69]{position:absolute;top:10px;bottom:0;left:0;width:1px;background:#ff0}@media (max-width: 720px){.czml-config[data-v-020c9b69]{bottom:120px}.czmlBar[data-v-020c9b69]{height:120px;flex-direction:column;gap:6px;min-height:0}.bar-control[data-v-020c9b69]{width:100%;display:flex;justify-content:space-between}.control-btns[data-v-020c9b69]{width:55%}.control-bottom[data-v-020c9b69]{flex:1}}
|
package/index.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import { default as cpCoord } from './src/coord/Index.vue';
|
|
|
4
4
|
import { default as cpOverlay } from './src/overlay/Index.vue';
|
|
5
5
|
import { default as cpPin } from './src/pin/Index.vue';
|
|
6
6
|
import { default as cpTianmap } from './src/tianmap/Index.vue';
|
|
7
|
+
import { default as cpCzmlPlayer } from './src/czml/player/Index.vue';
|
|
7
8
|
import { App } from 'vue';
|
|
8
9
|
declare const _default: {
|
|
9
10
|
install: (app: App) => App;
|
|
10
11
|
};
|
|
11
12
|
export default _default;
|
|
12
|
-
export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpTianmap };
|
|
13
|
+
export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpTianmap, cpCzmlPlayer };
|
|
13
14
|
export * from './pin.ts';
|
|
14
15
|
export * from './tianmap.ts';
|
|
15
16
|
export * from './drawer.ts';
|