cesium-pocket 0.6.9-alpha → 0.6.11-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-vZ4-zoaH.js → CircleDrawer-D2dAuEcD.js} +55 -37
- package/{PolygonGaguger-QdxgmZFu.js → PolygonGaguger-C8cFLW0V.js} +1 -1
- package/drawer.js +1 -1
- package/gauger.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +89 -89
- package/package.json +1 -1
- package/src/drawer/CP2dDrawer.d.ts +1 -0
- package/src/drawer/CircleDrawer.d.ts +1 -0
- package/src/drawer/RectDrawer.d.ts +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomDataSource as
|
|
1
|
+
import { CustomDataSource as U, Cartesian3 as r, JulianDate as N, defined as h, HeightReference as B, Color as E, EntityCollection as G, ScreenSpaceEventType as c, ConstantPositionProperty as A, ScreenSpaceEventHandler as C, VerticalOrigin as x, KeyboardEventModifier as b, PolylineDashMaterialProperty as Q, CallbackProperty as f, PolygonHierarchy as R, clone as F, Cartographic as L, Transforms as M, Matrix4 as P, EllipsoidGeodesic as W } from "cesium";
|
|
2
2
|
import { toRaw as u } from "vue";
|
|
3
3
|
const l = {
|
|
4
4
|
STOPED: Symbol("STOPED"),
|
|
@@ -26,7 +26,7 @@ const l = {
|
|
|
26
26
|
DEL_ENABLED: Symbol("DEL_ENABLED")
|
|
27
27
|
//可拖拽
|
|
28
28
|
};
|
|
29
|
-
class
|
|
29
|
+
class K {
|
|
30
30
|
constructor(e) {
|
|
31
31
|
this.status = l.STOPED, this.editStatus = o.DRAG_UNABLED, this.delStatus = D.DEL_UNABLED, this.viewer = e;
|
|
32
32
|
}
|
|
@@ -86,10 +86,10 @@ class W {
|
|
|
86
86
|
this.delStatus = D.DEL_ENABLED, this.viewer.canvas.style.cursor = "grabbing";
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
const
|
|
90
|
-
class S extends
|
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5cTkseMKVeK7D9mGbUcOUNkFZhMTgZjl+7xoq7XGJ0Cp75032HtAc5FN75jsG2VABGKU7n7BkF8b6TdBY8PmaFpa4QyIQAqneHiA5ral/yKLz1Pf2j4fz20dl2ODDIhADJI9MFQY8g17p2e+A92xniHZtcGACMQG61tiNieXlxGBRRLN8D6PRQfyyxwDfSKJQPqQYmNopbbEf4KyQLEX4n3alWabARGI7Qr0xMcg2M+9Z0h2LTMQWI4v4XsYWBlf+CL3niHZtcyACMRyASR8uRkQgZS7PoLOMgO6BGI5DQkvDBTDgAikGF7Fa0UYEIFUpJCSRjEMiECK4VW8VoQBEUhFCilpFMOAAwIpJnHxKgykYUAEkoYlsfGWARGIt6WXxNMwIAJJw5LYeMuACMTb0kviaRjwWyBpGBIbrxkQgXhdfkk+iQERSBJDMu81AyIQr8svyScxIAJJYkjmvWZABFJQ+cVtNRj4OQAAAP//gm46zwAAAAZJREFUAwB1f5TcL2bFTAAAAABJRU5ErkJggg==";
|
|
90
|
+
class S extends K {
|
|
91
91
|
constructor(e) {
|
|
92
|
-
super(e), this.mainData = [], this.dataSource = new
|
|
92
|
+
super(e), this.mainData = [], this.dataSource = new U("drawerDataSource"), this.currentDragPoint = null, this.currentIndex = -1, this.viewer.dataSources.add(this.dataSource);
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* 获取DataSource
|
|
@@ -106,7 +106,7 @@ class S extends W {
|
|
|
106
106
|
return this.mainData = [], this.dataSource.entities.values.forEach((e) => {
|
|
107
107
|
var i;
|
|
108
108
|
const t = new r();
|
|
109
|
-
(i = e.position) == null || i.getValue(
|
|
109
|
+
(i = e.position) == null || i.getValue(N.now(), t), this.mainData.push(t);
|
|
110
110
|
}), this.mainData;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
@@ -146,7 +146,7 @@ class S extends W {
|
|
|
146
146
|
color: E.TRANSPARENT,
|
|
147
147
|
outlineColor: E.YELLOW,
|
|
148
148
|
outlineWidth: 2,
|
|
149
|
-
heightReference:
|
|
149
|
+
heightReference: B.CLAMP_TO_GROUND
|
|
150
150
|
//贴地
|
|
151
151
|
}, this.dataSource.entities.add({
|
|
152
152
|
position: e,
|
|
@@ -174,9 +174,9 @@ class S extends W {
|
|
|
174
174
|
// });
|
|
175
175
|
// }
|
|
176
176
|
}
|
|
177
|
-
class
|
|
177
|
+
class Z extends S {
|
|
178
178
|
constructor(e, t = null) {
|
|
179
|
-
super(e), this.handler = null, this.pointCollection = new
|
|
179
|
+
super(e), this.handler = null, this.pointCollection = new G(), this.addPointFun = this.addBillboardCallback, this.point_L_ClickEvent = () => {
|
|
180
180
|
var i;
|
|
181
181
|
(i = this.handler) == null || i.setInputAction((a) => {
|
|
182
182
|
if (l.DRAWABLE == super.getStatus()) {
|
|
@@ -247,14 +247,14 @@ class _ extends S {
|
|
|
247
247
|
// 设置经纬度位置 (经度, 纬度, 海拔高度)
|
|
248
248
|
position: e,
|
|
249
249
|
billboard: {
|
|
250
|
-
image:
|
|
250
|
+
image: j,
|
|
251
251
|
// 设置图片显示的宽度和高度 (像素)
|
|
252
252
|
width: 40,
|
|
253
253
|
height: 40,
|
|
254
254
|
// 可选项:缩放倍数
|
|
255
255
|
scale: 1,
|
|
256
|
-
verticalOrigin:
|
|
257
|
-
heightReference:
|
|
256
|
+
verticalOrigin: x.BOTTOM,
|
|
257
|
+
heightReference: B.CLAMP_TO_GROUND
|
|
258
258
|
//贴地
|
|
259
259
|
},
|
|
260
260
|
show: !0
|
|
@@ -266,15 +266,15 @@ class _ extends S {
|
|
|
266
266
|
}) : confirm("确定要删除吗?") && (this.viewer.entities.remove(e), this.dsToMd());
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
const
|
|
269
|
+
const m = {
|
|
270
270
|
LINE: Symbol("LINE"),
|
|
271
271
|
//画线模式
|
|
272
272
|
POLYGON: Symbol("POLYGON")
|
|
273
273
|
//画面模式
|
|
274
274
|
};
|
|
275
|
-
class
|
|
275
|
+
class V extends S {
|
|
276
276
|
constructor(e, t) {
|
|
277
|
-
super(e), this.handler = null, this.mainLineEntity = null, this.mainPolygonEntity = null, this.dashLineEntity = null, this.dashEndData = null, this.drawerMode =
|
|
277
|
+
super(e), this.handler = null, this.mainLineEntity = null, this.mainPolygonEntity = null, this.dashLineEntity = null, this.dashEndData = null, this.drawerMode = m.LINE, this.r_ClickEvent = () => {
|
|
278
278
|
var i;
|
|
279
279
|
(i = this.handler) == null || i.setInputAction(() => {
|
|
280
280
|
l.DRAWABLE == super.getStatus() && (this.dashLineEntity && this.viewer.entities.removeById(this.dashLineEntity.id), this.dashEndData = null, this.stopStatus(), this.stopDrawCallbackFun && this.stopDrawCallbackFun());
|
|
@@ -286,7 +286,7 @@ class Z extends S {
|
|
|
286
286
|
let n = this.viewer.camera.getPickRay(a.position), s = this.viewer.scene.globe.pick(n, this.viewer.scene);
|
|
287
287
|
if (h(s)) {
|
|
288
288
|
const d = this.addPoint(s);
|
|
289
|
-
this.afterAddPointFun && this.afterAddPointFun(d), this.mainData.push(s), this.mainData.length > 0 && (this.mainLineEntity || this.createMainLine(), this.dashLineEntity || this.createDashline(), this.mainData.length > 1 && this.drawerMode ===
|
|
289
|
+
this.afterAddPointFun && this.afterAddPointFun(d), this.mainData.push(s), this.mainData.length > 0 && (this.mainLineEntity || this.createMainLine(), this.dashLineEntity || this.createDashline(), this.mainData.length > 1 && this.drawerMode === m.POLYGON && !this.mainPolygonEntity && this.createMainPolygon());
|
|
290
290
|
}
|
|
291
291
|
} else if (l.DELETABLE == super.getStatus()) {
|
|
292
292
|
const n = this.viewer.scene.pick(a.position);
|
|
@@ -344,7 +344,7 @@ class Z extends S {
|
|
|
344
344
|
new r()
|
|
345
345
|
],
|
|
346
346
|
width: 2,
|
|
347
|
-
material: new
|
|
347
|
+
material: new Q({
|
|
348
348
|
color: E.RED,
|
|
349
349
|
dashLength: 15
|
|
350
350
|
}),
|
|
@@ -365,32 +365,39 @@ class Z extends S {
|
|
|
365
365
|
super.drawableStatus(), this.handler || (this.handler = new C(this.viewer.scene.canvas)), this.r_ClickEvent(), this.l_ClickEvent(), this.l_ClickCtrlEvent(), this.l_DownEvent(), this.l_UpEvent(), this.moveCtrlEvent(), this.moveEvent();
|
|
366
366
|
}
|
|
367
367
|
getEntity() {
|
|
368
|
-
if (this.drawerMode ===
|
|
368
|
+
if (this.drawerMode === m.LINE)
|
|
369
369
|
return this.mainLineEntity;
|
|
370
|
-
if (this.drawerMode ===
|
|
370
|
+
if (this.drawerMode === m.POLYGON)
|
|
371
371
|
return this.mainPolygonEntity;
|
|
372
372
|
}
|
|
373
373
|
getPositions() {
|
|
374
374
|
return this.dsToMd();
|
|
375
375
|
}
|
|
376
|
+
setPositions(e) {
|
|
377
|
+
this.clearAll();
|
|
378
|
+
for (let t = 0, i = e.length; t < i; t++) {
|
|
379
|
+
const a = e[t];
|
|
380
|
+
this.addPoint(a);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
376
383
|
clearAll() {
|
|
377
384
|
this.clearAllData(), this.handler = null, this.mainLineEntity && this.viewer.entities.removeById(this.mainLineEntity.id), this.mainPolygonEntity && this.viewer.entities.removeById(this.mainPolygonEntity.id), this.dashLineEntity && this.viewer.entities.removeById(this.dashLineEntity.id);
|
|
378
385
|
}
|
|
379
386
|
measurePoint(e) {
|
|
380
387
|
let t = 1 / 0, i = -1, a = 0;
|
|
381
388
|
for (let n = 0, s = this.mainData.length; n < s - 1; n++) {
|
|
382
|
-
const d = this.mainData[n], g = this.mainData[n + 1], v = r.subtract(g, d, new r()),
|
|
389
|
+
const d = this.mainData[n], g = this.mainData[n + 1], v = r.subtract(g, d, new r()), k = r.subtract(e, d, new r()), I = r.dot(v, v);
|
|
383
390
|
let y, w;
|
|
384
391
|
if (I === 0)
|
|
385
392
|
y = r.distance(e, d), w = 0;
|
|
386
393
|
else {
|
|
387
|
-
w = r.dot(
|
|
388
|
-
const
|
|
394
|
+
w = r.dot(k, v) / I;
|
|
395
|
+
const T = Math.max(0, Math.min(1, w)), O = r.add(
|
|
389
396
|
d,
|
|
390
|
-
r.multiplyByScalar(v,
|
|
397
|
+
r.multiplyByScalar(v, T, new r()),
|
|
391
398
|
new r()
|
|
392
399
|
);
|
|
393
|
-
y = r.distance(e,
|
|
400
|
+
y = r.distance(e, O);
|
|
394
401
|
}
|
|
395
402
|
y < t && (t = y, i = n, a = w);
|
|
396
403
|
}
|
|
@@ -433,7 +440,7 @@ class Z extends S {
|
|
|
433
440
|
outline: !1
|
|
434
441
|
}, e.hierarchy = new f(() => {
|
|
435
442
|
let t = this.mainData;
|
|
436
|
-
return this.dashEndData && (t = [...this.mainData, this.dashEndData]), new
|
|
443
|
+
return this.dashEndData && (t = [...this.mainData, this.dashEndData]), new R(t);
|
|
437
444
|
}, !1), this.mainPolygonEntity = this.viewer.entities.add({
|
|
438
445
|
polygon: e,
|
|
439
446
|
properties: {
|
|
@@ -442,7 +449,7 @@ class Z extends S {
|
|
|
442
449
|
});
|
|
443
450
|
}
|
|
444
451
|
}
|
|
445
|
-
class
|
|
452
|
+
class X extends S {
|
|
446
453
|
constructor(e, t) {
|
|
447
454
|
super(e), this.handler = null, this.firstPoint = null, this.endPoint = null, this.lineEntity = null, this.polygonEntity = null, this.rect_L_ClickEvent = () => {
|
|
448
455
|
var i;
|
|
@@ -482,6 +489,14 @@ class V extends S {
|
|
|
482
489
|
getPositions() {
|
|
483
490
|
return this.dsToMd();
|
|
484
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* 根据数据直接生成图形
|
|
494
|
+
* @param startPoint 起始点坐标
|
|
495
|
+
* @param endPoint 结束点坐标
|
|
496
|
+
*/
|
|
497
|
+
setPositions(e, t) {
|
|
498
|
+
this.clearAll(), this.firstPoint = F(e), this.endPoint = F(t), this.initMainData(), this.createLine(), this.createPolygon();
|
|
499
|
+
}
|
|
485
500
|
clearAll() {
|
|
486
501
|
this.clearAllData(), this.firstPoint = new r(), this.endPoint = new r(), this.mainData = [], this.handler && (this.handler = null), this.polygonEntity && this.viewer.entities.removeById(this.polygonEntity.id), this.lineEntity && this.viewer.entities.removeById(this.lineEntity.id);
|
|
487
502
|
}
|
|
@@ -496,7 +511,7 @@ class V extends S {
|
|
|
496
511
|
}
|
|
497
512
|
initMainData() {
|
|
498
513
|
if (this.firstPoint && this.endPoint) {
|
|
499
|
-
const e =
|
|
514
|
+
const e = L.fromCartesian(this.firstPoint), t = e.longitude, i = e.latitude, a = L.fromCartesian(this.endPoint), n = a.longitude, s = a.latitude, d = r.fromRadians(t, s), g = r.fromRadians(n, i);
|
|
500
515
|
this.mainData[0] = this.firstPoint, this.mainData[1] = d, this.mainData[2] = this.endPoint, this.mainData[3] = g;
|
|
501
516
|
}
|
|
502
517
|
}
|
|
@@ -526,7 +541,7 @@ class V extends S {
|
|
|
526
541
|
hierarchy: [new r(), new r(), new r()],
|
|
527
542
|
material: E.RED.withAlpha(0.4),
|
|
528
543
|
outline: !1
|
|
529
|
-
}, e.hierarchy = new f(() => new
|
|
544
|
+
}, e.hierarchy = new f(() => new R(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
|
|
530
545
|
polygon: e,
|
|
531
546
|
properties: {
|
|
532
547
|
entityType: "POLYGON"
|
|
@@ -534,7 +549,7 @@ class V extends S {
|
|
|
534
549
|
});
|
|
535
550
|
}
|
|
536
551
|
}
|
|
537
|
-
class
|
|
552
|
+
class J extends S {
|
|
538
553
|
constructor(e, t) {
|
|
539
554
|
super(e), this.handler = null, this.firstPoint = new r(), this.endPoint = new r(), this.distance = 0, this.angle = 0, this.endPointEntity = null, this.ellipseEntity = null, this.circle_L_ClickEvent = () => {
|
|
540
555
|
var i;
|
|
@@ -574,11 +589,14 @@ class X extends S {
|
|
|
574
589
|
getPositions() {
|
|
575
590
|
return this.dsToMd();
|
|
576
591
|
}
|
|
592
|
+
setPositions(e, t) {
|
|
593
|
+
this.clearAll(), this.firstPoint = e, this.endPoint = t, this.countDistance(), this.createCircle();
|
|
594
|
+
}
|
|
577
595
|
clearAll() {
|
|
578
596
|
this.clearAllData(), this.firstPoint = new r(), this.endPoint = new r(), this.handler && (this.handler = null), this.ellipseEntity && this.viewer.entities.removeById(this.ellipseEntity.id);
|
|
579
597
|
}
|
|
580
598
|
setAngle() {
|
|
581
|
-
const e =
|
|
599
|
+
const e = M.eastNorthUpToFixedFrame(this.firstPoint.clone()), t = P.inverse(e, new P()), i = P.multiplyByPoint(t, this.endPoint.clone(), new r());
|
|
582
600
|
this.angle = Math.atan2(i.x, i.y);
|
|
583
601
|
}
|
|
584
602
|
circleMove(e, t) {
|
|
@@ -596,12 +614,12 @@ class X extends S {
|
|
|
596
614
|
this.distance * Math.cos(this.angle),
|
|
597
615
|
0
|
|
598
616
|
// 保持水平,如果希望保持高度则设为 localEdge.z
|
|
599
|
-
), t =
|
|
617
|
+
), t = M.eastNorthUpToFixedFrame(this.firstPoint), i = P.multiplyByPointAsVector(t, e, new r());
|
|
600
618
|
this.endPoint = r.add(this.firstPoint, i, new r());
|
|
601
619
|
}
|
|
602
620
|
countDistance() {
|
|
603
621
|
if (this.firstPoint && this.endPoint) {
|
|
604
|
-
const e =
|
|
622
|
+
const e = L.fromCartesian(this.firstPoint), t = L.fromCartesian(this.endPoint), i = new W(e, t);
|
|
605
623
|
this.distance = i.surfaceDistance;
|
|
606
624
|
}
|
|
607
625
|
}
|
|
@@ -632,10 +650,10 @@ class X extends S {
|
|
|
632
650
|
}
|
|
633
651
|
}
|
|
634
652
|
export {
|
|
635
|
-
|
|
653
|
+
V as C,
|
|
636
654
|
l as D,
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
655
|
+
Z as P,
|
|
656
|
+
X as R,
|
|
657
|
+
J as a,
|
|
658
|
+
m as b
|
|
641
659
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cartographic as v, EllipsoidGeodesic as Y, Cartesian3 as g, BoundingSphere as N, Transforms as y, Matrix4 as M, CustomDataSource as L, ConstantPositionProperty as d, ConstantProperty as u, Color as c, Cartesian2 as B, VerticalOrigin as F, HorizontalOrigin as T, LabelStyle as x, Math as k } from "cesium";
|
|
2
|
-
import { a as j, R as U, P as W, D as G, C as O, b as Z } from "./CircleDrawer-
|
|
2
|
+
import { a as j, R as U, P as W, D as G, C as O, b as Z } from "./CircleDrawer-D2dAuEcD.js";
|
|
3
3
|
const A = (n, t) => {
|
|
4
4
|
const l = v.fromCartesian(n), e = v.fromCartesian(t);
|
|
5
5
|
return new Y(l, e).surfaceDistance;
|
package/drawer.js
CHANGED
package/gauger.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import { default as cpCoord } from './src/base/coord/Index.vue';
|
|
|
4
4
|
import { default as cpOverlay } from './src/base/overlay/Index.vue';
|
|
5
5
|
import { default as cpPin } from './src/base/pin/Index.vue';
|
|
6
6
|
import { default as cpLayersPicker } from './src/layers/picker/Index.vue';
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as cpLayersSplit } from './src/layers/split/Index.vue';
|
|
8
8
|
import { default as cpCzmlPlayer } from './src/czml/player/Index.vue';
|
|
9
9
|
import { App } from 'vue';
|
|
10
10
|
declare const _default: {
|
|
11
11
|
install: (app: App) => App<any>;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
14
|
-
export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpLayersPicker,
|
|
14
|
+
export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpLayersPicker, cpLayersSplit, cpCzmlPlayer };
|
|
15
15
|
export * from './pin';
|
|
16
16
|
export * from './drawer';
|
|
17
17
|
export * from './gauger';
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as G, ref as u, onMounted as Z, onUnmounted as sA, createElementBlock as f, openBlock as b, nextTick as EA, createTextVNode as eA, createElementVNode as z, toDisplayString as h, mergeModels as
|
|
1
|
+
import { defineComponent as G, ref as u, onMounted as Z, onUnmounted as sA, createElementBlock as f, openBlock as b, nextTick as EA, createTextVNode as eA, createElementVNode as z, toDisplayString as h, mergeModels as pP, useModel as uP, computed as dA, withDirectives as tA, normalizeStyle as j, unref as O, renderSlot as tP, vShow as lA, createCommentVNode as AA, Fragment as yA, renderList as kA, normalizeClass as jA, watch as nP, vModelRadio as NA } from "vue";
|
|
2
2
|
import * as DA from "three";
|
|
3
|
-
import { TrianglesDrawMode as MP, TriangleFanDrawMode as UA, TriangleStripDrawMode as sP, Loader as fP, LoaderUtils as gA, FileLoader as rP, Color as R, LinearSRGBColorSpace as N, SpotLight as bP, PointLight as mP, DirectionalLight as dP, MeshBasicMaterial as vA, SRGBColorSpace as wA, MeshPhysicalMaterial as q, Vector2 as BP, Matrix4 as TA, Vector3 as PA, Quaternion as vP, InstancedMesh as yP, InstancedBufferAttribute as kP, Object3D as gP, TextureLoader as jP, ImageBitmapLoader as UP, BufferAttribute as
|
|
3
|
+
import { TrianglesDrawMode as MP, TriangleFanDrawMode as UA, TriangleStripDrawMode as sP, Loader as fP, LoaderUtils as gA, FileLoader as rP, Color as R, LinearSRGBColorSpace as N, SpotLight as bP, PointLight as mP, DirectionalLight as dP, MeshBasicMaterial as vA, SRGBColorSpace as wA, MeshPhysicalMaterial as q, Vector2 as BP, Matrix4 as TA, Vector3 as PA, Quaternion as vP, InstancedMesh as yP, InstancedBufferAttribute as kP, Object3D as gP, TextureLoader as jP, ImageBitmapLoader as UP, BufferAttribute as iA, InterleavedBuffer as HP, InterleavedBufferAttribute as LP, LinearMipmapLinearFilter as cP, NearestMipmapLinearFilter as SP, LinearMipmapNearestFilter as OP, NearestMipmapNearestFilter as hP, LinearFilter as HA, NearestFilter as CP, RepeatWrapping as LA, MirroredRepeatWrapping as qP, ClampToEdgeWrapping as JP, PointsMaterial as KP, Material as pA, LineBasicMaterial as NP, MeshStandardMaterial as wP, DoubleSide as YP, PropertyBinding as xP, BufferGeometry as VP, SkinnedMesh as GP, Mesh as ZP, LineSegments as XP, Line as WP, LineLoop as FP, Points as RP, Group as uA, PerspectiveCamera as _P, MathUtils as $P, OrthographicCamera as Ae, Skeleton as Pe, AnimationClip as ee, Bone as te, InterpolateDiscrete as ne, InterpolateLinear as DP, ColorManagement as YA, Texture as xA, VectorKeyframeTrack as VA, NumberKeyframeTrack as GA, QuaternionKeyframeTrack as ZA, FrontSide as se, Interpolant as re, Box3 as Be, Sphere as ve } from "three";
|
|
4
4
|
import { Viewer as _, Math as Y, Cartesian2 as cA, Cartesian3 as U, Cartographic as V, SceneTransforms as ge, Ray as ce, Color as zA, ScreenSpaceEventType as MA, ScreenSpaceEventHandler as Ce, createWorldTerrainAsync as we, EllipsoidTerrainProvider as De, SplitDirection as XA, JulianDate as K, CzmlDataSource as Qe, sampleTerrainMostDetailed as IA, ClippingPolygonCollection as Ie, ClippingPolygon as le, Transforms as Te, Matrix4 as QA, EllipsoidGeodesic as QP, ImageMaterialProperty as ze, CallbackProperty as WA } from "cesium";
|
|
5
5
|
import { P as rA, a as FA, b as Ee, c as oe, d as ae, C as RA } from "./index-CcaLwHv1.js";
|
|
6
|
-
import { L as
|
|
6
|
+
import { L as ie } from "./LayersManager-BElb5fPR.js";
|
|
7
7
|
import { C as jn } from "./LayersManager-BElb5fPR.js";
|
|
8
|
-
import { C as Hn, a as Ln, b as Sn, D as On, P as hn, R as qn } from "./CircleDrawer-
|
|
9
|
-
import { C as Kn, L as Nn, P as Yn, a as xn, R as Vn } from "./PolygonGaguger-
|
|
8
|
+
import { C as Hn, a as Ln, b as Sn, D as On, P as hn, R as qn } from "./CircleDrawer-D2dAuEcD.js";
|
|
9
|
+
import { C as Kn, L as Nn, P as Yn, a as xn, R as Vn } from "./PolygonGaguger-C8cFLW0V.js";
|
|
10
10
|
function _A(w, A) {
|
|
11
11
|
if (A === MP)
|
|
12
12
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), w;
|
|
@@ -34,7 +34,7 @@ function _A(w, A) {
|
|
|
34
34
|
} else
|
|
35
35
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", A), w;
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class pe extends fP {
|
|
38
38
|
/**
|
|
39
39
|
* Constructs a new glTF loader.
|
|
40
40
|
*
|
|
@@ -176,12 +176,12 @@ class ie extends fP {
|
|
|
176
176
|
else if (A instanceof ArrayBuffer)
|
|
177
177
|
if (B.decode(new Uint8Array(A, 0, 4)) === IP) {
|
|
178
178
|
try {
|
|
179
|
-
s[
|
|
179
|
+
s[i.KHR_BINARY_GLTF] = new Ye(A);
|
|
180
180
|
} catch (g) {
|
|
181
181
|
e && e(g);
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
-
n = JSON.parse(s[
|
|
184
|
+
n = JSON.parse(s[i.KHR_BINARY_GLTF].content);
|
|
185
185
|
} else
|
|
186
186
|
n = JSON.parse(B.decode(A));
|
|
187
187
|
else
|
|
@@ -207,16 +207,16 @@ class ie extends fP {
|
|
|
207
207
|
for (let c = 0; c < n.extensionsUsed.length; ++c) {
|
|
208
208
|
const g = n.extensionsUsed[c], C = n.extensionsRequired || [];
|
|
209
209
|
switch (g) {
|
|
210
|
-
case
|
|
210
|
+
case i.KHR_MATERIALS_UNLIT:
|
|
211
211
|
s[g] = new fe();
|
|
212
212
|
break;
|
|
213
|
-
case
|
|
213
|
+
case i.KHR_DRACO_MESH_COMPRESSION:
|
|
214
214
|
s[g] = new xe(n, this.dracoLoader);
|
|
215
215
|
break;
|
|
216
|
-
case
|
|
216
|
+
case i.KHR_TEXTURE_TRANSFORM:
|
|
217
217
|
s[g] = new Ve();
|
|
218
218
|
break;
|
|
219
|
-
case
|
|
219
|
+
case i.KHR_MESH_QUANTIZATION:
|
|
220
220
|
s[g] = new Ge();
|
|
221
221
|
break;
|
|
222
222
|
default:
|
|
@@ -257,7 +257,7 @@ function ue() {
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const i = {
|
|
261
261
|
KHR_BINARY_GLTF: "KHR_binary_glTF",
|
|
262
262
|
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
|
|
263
263
|
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
|
|
@@ -283,7 +283,7 @@ const p = {
|
|
|
283
283
|
};
|
|
284
284
|
class Me {
|
|
285
285
|
constructor(A) {
|
|
286
|
-
this.parser = A, this.name =
|
|
286
|
+
this.parser = A, this.name = i.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
287
287
|
}
|
|
288
288
|
_markDefs() {
|
|
289
289
|
const A = this.parser, P = this.parser.json.nodes || [];
|
|
@@ -329,7 +329,7 @@ class Me {
|
|
|
329
329
|
}
|
|
330
330
|
class fe {
|
|
331
331
|
constructor() {
|
|
332
|
-
this.name =
|
|
332
|
+
this.name = i.KHR_MATERIALS_UNLIT;
|
|
333
333
|
}
|
|
334
334
|
getMaterialType() {
|
|
335
335
|
return vA;
|
|
@@ -350,7 +350,7 @@ class fe {
|
|
|
350
350
|
}
|
|
351
351
|
class be {
|
|
352
352
|
constructor(A) {
|
|
353
|
-
this.parser = A, this.name =
|
|
353
|
+
this.parser = A, this.name = i.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
354
354
|
}
|
|
355
355
|
extendMaterialParams(A, P) {
|
|
356
356
|
const e = this.parser.json.materials[A];
|
|
@@ -362,7 +362,7 @@ class be {
|
|
|
362
362
|
}
|
|
363
363
|
class me {
|
|
364
364
|
constructor(A) {
|
|
365
|
-
this.parser = A, this.name =
|
|
365
|
+
this.parser = A, this.name = i.KHR_MATERIALS_CLEARCOAT;
|
|
366
366
|
}
|
|
367
367
|
getMaterialType(A) {
|
|
368
368
|
const t = this.parser.json.materials[A];
|
|
@@ -382,7 +382,7 @@ class me {
|
|
|
382
382
|
}
|
|
383
383
|
class de {
|
|
384
384
|
constructor(A) {
|
|
385
|
-
this.parser = A, this.name =
|
|
385
|
+
this.parser = A, this.name = i.KHR_MATERIALS_DISPERSION;
|
|
386
386
|
}
|
|
387
387
|
getMaterialType(A) {
|
|
388
388
|
const t = this.parser.json.materials[A];
|
|
@@ -398,7 +398,7 @@ class de {
|
|
|
398
398
|
}
|
|
399
399
|
class ye {
|
|
400
400
|
constructor(A) {
|
|
401
|
-
this.parser = A, this.name =
|
|
401
|
+
this.parser = A, this.name = i.KHR_MATERIALS_IRIDESCENCE;
|
|
402
402
|
}
|
|
403
403
|
getMaterialType(A) {
|
|
404
404
|
const t = this.parser.json.materials[A];
|
|
@@ -414,7 +414,7 @@ class ye {
|
|
|
414
414
|
}
|
|
415
415
|
class ke {
|
|
416
416
|
constructor(A) {
|
|
417
|
-
this.parser = A, this.name =
|
|
417
|
+
this.parser = A, this.name = i.KHR_MATERIALS_SHEEN;
|
|
418
418
|
}
|
|
419
419
|
getMaterialType(A) {
|
|
420
420
|
const t = this.parser.json.materials[A];
|
|
@@ -436,7 +436,7 @@ class ke {
|
|
|
436
436
|
}
|
|
437
437
|
class je {
|
|
438
438
|
constructor(A) {
|
|
439
|
-
this.parser = A, this.name =
|
|
439
|
+
this.parser = A, this.name = i.KHR_MATERIALS_TRANSMISSION;
|
|
440
440
|
}
|
|
441
441
|
getMaterialType(A) {
|
|
442
442
|
const t = this.parser.json.materials[A];
|
|
@@ -452,7 +452,7 @@ class je {
|
|
|
452
452
|
}
|
|
453
453
|
class Ue {
|
|
454
454
|
constructor(A) {
|
|
455
|
-
this.parser = A, this.name =
|
|
455
|
+
this.parser = A, this.name = i.KHR_MATERIALS_VOLUME;
|
|
456
456
|
}
|
|
457
457
|
getMaterialType(A) {
|
|
458
458
|
const t = this.parser.json.materials[A];
|
|
@@ -470,7 +470,7 @@ class Ue {
|
|
|
470
470
|
}
|
|
471
471
|
class He {
|
|
472
472
|
constructor(A) {
|
|
473
|
-
this.parser = A, this.name =
|
|
473
|
+
this.parser = A, this.name = i.KHR_MATERIALS_IOR;
|
|
474
474
|
}
|
|
475
475
|
getMaterialType(A) {
|
|
476
476
|
const t = this.parser.json.materials[A];
|
|
@@ -486,7 +486,7 @@ class He {
|
|
|
486
486
|
}
|
|
487
487
|
class Le {
|
|
488
488
|
constructor(A) {
|
|
489
|
-
this.parser = A, this.name =
|
|
489
|
+
this.parser = A, this.name = i.KHR_MATERIALS_SPECULAR;
|
|
490
490
|
}
|
|
491
491
|
getMaterialType(A) {
|
|
492
492
|
const t = this.parser.json.materials[A];
|
|
@@ -504,7 +504,7 @@ class Le {
|
|
|
504
504
|
}
|
|
505
505
|
class Se {
|
|
506
506
|
constructor(A) {
|
|
507
|
-
this.parser = A, this.name =
|
|
507
|
+
this.parser = A, this.name = i.EXT_MATERIALS_BUMP;
|
|
508
508
|
}
|
|
509
509
|
getMaterialType(A) {
|
|
510
510
|
const t = this.parser.json.materials[A];
|
|
@@ -520,7 +520,7 @@ class Se {
|
|
|
520
520
|
}
|
|
521
521
|
class Oe {
|
|
522
522
|
constructor(A) {
|
|
523
|
-
this.parser = A, this.name =
|
|
523
|
+
this.parser = A, this.name = i.KHR_MATERIALS_ANISOTROPY;
|
|
524
524
|
}
|
|
525
525
|
getMaterialType(A) {
|
|
526
526
|
const t = this.parser.json.materials[A];
|
|
@@ -536,7 +536,7 @@ class Oe {
|
|
|
536
536
|
}
|
|
537
537
|
class he {
|
|
538
538
|
constructor(A) {
|
|
539
|
-
this.parser = A, this.name =
|
|
539
|
+
this.parser = A, this.name = i.KHR_TEXTURE_BASISU;
|
|
540
540
|
}
|
|
541
541
|
loadTexture(A) {
|
|
542
542
|
const P = this.parser, t = P.json, e = t.textures[A];
|
|
@@ -553,7 +553,7 @@ class he {
|
|
|
553
553
|
}
|
|
554
554
|
class qe {
|
|
555
555
|
constructor(A) {
|
|
556
|
-
this.parser = A, this.name =
|
|
556
|
+
this.parser = A, this.name = i.EXT_TEXTURE_WEBP;
|
|
557
557
|
}
|
|
558
558
|
loadTexture(A) {
|
|
559
559
|
const P = this.name, t = this.parser, e = t.json, n = e.textures[A];
|
|
@@ -570,7 +570,7 @@ class qe {
|
|
|
570
570
|
}
|
|
571
571
|
class Je {
|
|
572
572
|
constructor(A) {
|
|
573
|
-
this.parser = A, this.name =
|
|
573
|
+
this.parser = A, this.name = i.EXT_TEXTURE_AVIF;
|
|
574
574
|
}
|
|
575
575
|
loadTexture(A) {
|
|
576
576
|
const P = this.name, t = this.parser, e = t.json, n = e.textures[A];
|
|
@@ -587,7 +587,7 @@ class Je {
|
|
|
587
587
|
}
|
|
588
588
|
class Ke {
|
|
589
589
|
constructor(A) {
|
|
590
|
-
this.name =
|
|
590
|
+
this.name = i.EXT_MESHOPT_COMPRESSION, this.parser = A;
|
|
591
591
|
}
|
|
592
592
|
loadBufferView(A) {
|
|
593
593
|
const P = this.parser.json, t = P.bufferViews[A];
|
|
@@ -613,7 +613,7 @@ class Ke {
|
|
|
613
613
|
}
|
|
614
614
|
class Ne {
|
|
615
615
|
constructor(A) {
|
|
616
|
-
this.name =
|
|
616
|
+
this.name = i.EXT_MESH_GPU_INSTANCING, this.parser = A;
|
|
617
617
|
}
|
|
618
618
|
createNodeMesh(A) {
|
|
619
619
|
const P = this.parser.json, t = P.nodes[A];
|
|
@@ -629,15 +629,15 @@ class Ne {
|
|
|
629
629
|
return r.length < 1 ? null : (r.push(this.parser.createNodeMesh(A)), Promise.all(r).then((v) => {
|
|
630
630
|
const c = v.pop(), g = c.isGroup ? c.children : [c], C = v[0].count, D = [];
|
|
631
631
|
for (const Q of g) {
|
|
632
|
-
const I = new TA(), l = new PA(), T = new vP(), a = new PA(1, 1, 1),
|
|
632
|
+
const I = new TA(), l = new PA(), T = new vP(), a = new PA(1, 1, 1), p = new yP(Q.geometry, Q.material, C);
|
|
633
633
|
for (let E = 0; E < C; E++)
|
|
634
|
-
B.TRANSLATION && l.fromBufferAttribute(B.TRANSLATION, E), B.ROTATION && T.fromBufferAttribute(B.ROTATION, E), B.SCALE && a.fromBufferAttribute(B.SCALE, E),
|
|
634
|
+
B.TRANSLATION && l.fromBufferAttribute(B.TRANSLATION, E), B.ROTATION && T.fromBufferAttribute(B.ROTATION, E), B.SCALE && a.fromBufferAttribute(B.SCALE, E), p.setMatrixAt(E, I.compose(l, T, a));
|
|
635
635
|
for (const E in B)
|
|
636
636
|
if (E === "_COLOR_0") {
|
|
637
637
|
const d = B[E];
|
|
638
|
-
|
|
638
|
+
p.instanceColor = new kP(d.array, d.itemSize, d.normalized);
|
|
639
639
|
} else E !== "TRANSLATION" && E !== "ROTATION" && E !== "SCALE" && Q.geometry.setAttribute(E, B[E]);
|
|
640
|
-
gP.prototype.copy.call(
|
|
640
|
+
gP.prototype.copy.call(p, Q), this.parser.assignFinalMaterial(p), D.push(p);
|
|
641
641
|
}
|
|
642
642
|
return c.isGroup ? (c.clear(), c.add(...D), c) : D[0];
|
|
643
643
|
}));
|
|
@@ -646,7 +646,7 @@ class Ne {
|
|
|
646
646
|
const IP = "glTF", BA = 12, $A = { JSON: 1313821514, BIN: 5130562 };
|
|
647
647
|
class Ye {
|
|
648
648
|
constructor(A) {
|
|
649
|
-
this.name =
|
|
649
|
+
this.name = i.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
650
650
|
const P = new DataView(A, 0, BA), t = new TextDecoder();
|
|
651
651
|
if (this.header = {
|
|
652
652
|
magic: t.decode(new Uint8Array(A.slice(0, 4))),
|
|
@@ -679,7 +679,7 @@ class xe {
|
|
|
679
679
|
constructor(A, P) {
|
|
680
680
|
if (!P)
|
|
681
681
|
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
682
|
-
this.name =
|
|
682
|
+
this.name = i.KHR_DRACO_MESH_COMPRESSION, this.json = A, this.dracoLoader = P, this.dracoLoader.preload();
|
|
683
683
|
}
|
|
684
684
|
decodePrimitive(A, P) {
|
|
685
685
|
const t = this.json, e = this.dracoLoader, n = A.extensions[this.name].bufferView, s = A.extensions[this.name].attributes, r = {}, B = {}, v = {};
|
|
@@ -709,7 +709,7 @@ class xe {
|
|
|
709
709
|
}
|
|
710
710
|
class Ve {
|
|
711
711
|
constructor() {
|
|
712
|
-
this.name =
|
|
712
|
+
this.name = i.KHR_TEXTURE_TRANSFORM;
|
|
713
713
|
}
|
|
714
714
|
extendTexture(A, P) {
|
|
715
715
|
return (P.texCoord === void 0 || P.texCoord === A.channel) && P.offset === void 0 && P.rotation === void 0 && P.scale === void 0 || (A = A.clone(), P.texCoord !== void 0 && (A.channel = P.texCoord), P.offset !== void 0 && A.offset.fromArray(P.offset), P.rotation !== void 0 && (A.rotation = P.rotation), P.scale !== void 0 && A.repeat.fromArray(P.scale), A.needsUpdate = !0), A;
|
|
@@ -717,7 +717,7 @@ class Ve {
|
|
|
717
717
|
}
|
|
718
718
|
class Ge {
|
|
719
719
|
constructor() {
|
|
720
|
-
this.name =
|
|
720
|
+
this.name = i.KHR_MESH_QUANTIZATION;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
class lP extends re {
|
|
@@ -731,10 +731,10 @@ class lP extends re {
|
|
|
731
731
|
return P;
|
|
732
732
|
}
|
|
733
733
|
interpolate_(A, P, t, e) {
|
|
734
|
-
const n = this.resultBuffer, s = this.sampleValues, r = this.valueSize, B = r * 2, v = r * 3, c = e - P, g = (t - P) / c, C = g * g, D = C * g, Q = A * v, I = Q - v, l = -2 * D + 3 * C, T = D - C, a = 1 - l,
|
|
734
|
+
const n = this.resultBuffer, s = this.sampleValues, r = this.valueSize, B = r * 2, v = r * 3, c = e - P, g = (t - P) / c, C = g * g, D = C * g, Q = A * v, I = Q - v, l = -2 * D + 3 * C, T = D - C, a = 1 - l, p = T - C + g;
|
|
735
735
|
for (let E = 0; E !== r; E++) {
|
|
736
736
|
const d = s[I + E + r], y = s[I + E + B] * c, k = s[Q + E + r], W = s[Q + E] * c;
|
|
737
|
-
n[E] = a * d +
|
|
737
|
+
n[E] = a * d + p * y + l * k + T * W;
|
|
738
738
|
}
|
|
739
739
|
return n;
|
|
740
740
|
}
|
|
@@ -873,7 +873,7 @@ function _e(w, A) {
|
|
|
873
873
|
}
|
|
874
874
|
function $e(w) {
|
|
875
875
|
let A;
|
|
876
|
-
const P = w.extensions && w.extensions[
|
|
876
|
+
const P = w.extensions && w.extensions[i.KHR_DRACO_MESH_COMPRESSION];
|
|
877
877
|
if (P ? A = "draco:" + P.bufferView + ":" + P.indices + ":" + mA(P.attributes) : A = w.indices + ":" + mA(w.attributes) + ":" + w.mode, w.targets !== void 0)
|
|
878
878
|
for (let t = 0, e = w.targets.length; t < e; t++)
|
|
879
879
|
A += ":" + mA(w.targets[t]);
|
|
@@ -1122,7 +1122,7 @@ class et {
|
|
|
1122
1122
|
if (P.type && P.type !== "arraybuffer")
|
|
1123
1123
|
throw new Error("THREE.GLTFLoader: " + P.type + " buffer type is not supported.");
|
|
1124
1124
|
if (P.uri === void 0 && A === 0)
|
|
1125
|
-
return Promise.resolve(this.extensions[
|
|
1125
|
+
return Promise.resolve(this.extensions[i.KHR_BINARY_GLTF].body);
|
|
1126
1126
|
const e = this.options;
|
|
1127
1127
|
return new Promise(function(n, s) {
|
|
1128
1128
|
t.load(gA.resolveURL(P.uri, e.path), n, void 0, function() {
|
|
@@ -1155,7 +1155,7 @@ class et {
|
|
|
1155
1155
|
const P = this, t = this.json, e = this.json.accessors[A];
|
|
1156
1156
|
if (e.bufferView === void 0 && e.sparse === void 0) {
|
|
1157
1157
|
const s = fA[e.type], r = nA[e.componentType], B = e.normalized === !0, v = new r(e.count * s);
|
|
1158
|
-
return Promise.resolve(new
|
|
1158
|
+
return Promise.resolve(new iA(v, s, B));
|
|
1159
1159
|
}
|
|
1160
1160
|
const n = [];
|
|
1161
1161
|
return e.bufferView !== void 0 ? n.push(this.getDependency("bufferView", e.bufferView)) : n.push(null), e.sparse !== void 0 && (n.push(this.getDependency("bufferView", e.sparse.indices.bufferView)), n.push(this.getDependency("bufferView", e.sparse.values.bufferView))), Promise.all(n).then(function(s) {
|
|
@@ -1163,13 +1163,13 @@ class et {
|
|
|
1163
1163
|
let I, l;
|
|
1164
1164
|
if (D && D !== g) {
|
|
1165
1165
|
const T = Math.floor(C / D), a = "InterleavedBuffer:" + e.bufferView + ":" + e.componentType + ":" + T + ":" + e.count;
|
|
1166
|
-
let
|
|
1167
|
-
|
|
1166
|
+
let p = P.cache.get(a);
|
|
1167
|
+
p || (I = new v(r, T * D, e.count * D / c), p = new HP(I, D / c), P.cache.add(a, p)), l = new LP(p, B, C % D / c, Q);
|
|
1168
1168
|
} else
|
|
1169
|
-
r === null ? I = new v(e.count * B) : I = new v(r, C, e.count * B), l = new
|
|
1169
|
+
r === null ? I = new v(e.count * B) : I = new v(r, C, e.count * B), l = new iA(I, B, Q);
|
|
1170
1170
|
if (e.sparse !== void 0) {
|
|
1171
|
-
const T = fA.SCALAR, a = nA[e.sparse.indices.componentType],
|
|
1172
|
-
r !== null && (l = new
|
|
1171
|
+
const T = fA.SCALAR, a = nA[e.sparse.indices.componentType], p = e.sparse.indices.byteOffset || 0, E = e.sparse.values.byteOffset || 0, d = new a(s[1], p, e.sparse.count * T), y = new v(s[2], E, e.sparse.count * B);
|
|
1172
|
+
r !== null && (l = new iA(l.array.slice(), l.itemSize, l.normalized)), l.normalized = !1;
|
|
1173
1173
|
for (let k = 0, W = d.length; k < W; k++) {
|
|
1174
1174
|
const S = d[k];
|
|
1175
1175
|
if (l.setX(S, y[k * B]), B >= 2 && l.setY(S, y[k * B + 1]), B >= 3 && l.setZ(S, y[k * B + 2]), B >= 4 && l.setW(S, y[k * B + 3]), B >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
@@ -1251,11 +1251,11 @@ class et {
|
|
|
1251
1251
|
const n = this;
|
|
1252
1252
|
return this.getDependency("texture", t.index).then(function(s) {
|
|
1253
1253
|
if (!s) return null;
|
|
1254
|
-
if (t.texCoord !== void 0 && t.texCoord > 0 && (s = s.clone(), s.channel = t.texCoord), n.extensions[
|
|
1255
|
-
const r = t.extensions !== void 0 ? t.extensions[
|
|
1254
|
+
if (t.texCoord !== void 0 && t.texCoord > 0 && (s = s.clone(), s.channel = t.texCoord), n.extensions[i.KHR_TEXTURE_TRANSFORM]) {
|
|
1255
|
+
const r = t.extensions !== void 0 ? t.extensions[i.KHR_TEXTURE_TRANSFORM] : void 0;
|
|
1256
1256
|
if (r) {
|
|
1257
1257
|
const B = n.associations.get(s);
|
|
1258
|
-
s = n.extensions[
|
|
1258
|
+
s = n.extensions[i.KHR_TEXTURE_TRANSFORM].extendTexture(s, r), n.associations.set(s, B);
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
return e !== void 0 && (s.colorSpace = e), A[P] = s, s;
|
|
@@ -1278,11 +1278,11 @@ class et {
|
|
|
1278
1278
|
if (A.isPoints) {
|
|
1279
1279
|
const r = "PointsMaterial:" + t.uuid;
|
|
1280
1280
|
let B = this.cache.get(r);
|
|
1281
|
-
B || (B = new KP(),
|
|
1281
|
+
B || (B = new KP(), pA.prototype.copy.call(B, t), B.color.copy(t.color), B.map = t.map, B.sizeAttenuation = !1, this.cache.add(r, B)), t = B;
|
|
1282
1282
|
} else if (A.isLine) {
|
|
1283
1283
|
const r = "LineBasicMaterial:" + t.uuid;
|
|
1284
1284
|
let B = this.cache.get(r);
|
|
1285
|
-
B || (B = new NP(),
|
|
1285
|
+
B || (B = new NP(), pA.prototype.copy.call(B, t), B.color.copy(t.color), B.map = t.map, this.cache.add(r, B)), t = B;
|
|
1286
1286
|
}
|
|
1287
1287
|
if (e || n || s) {
|
|
1288
1288
|
let r = "ClonedMaterial:" + t.uuid + ":";
|
|
@@ -1306,8 +1306,8 @@ class et {
|
|
|
1306
1306
|
const P = this, t = this.json, e = this.extensions, n = t.materials[A];
|
|
1307
1307
|
let s;
|
|
1308
1308
|
const r = {}, B = n.extensions || {}, v = [];
|
|
1309
|
-
if (B[
|
|
1310
|
-
const g = e[
|
|
1309
|
+
if (B[i.KHR_MATERIALS_UNLIT]) {
|
|
1310
|
+
const g = e[i.KHR_MATERIALS_UNLIT];
|
|
1311
1311
|
s = g.getMaterialType(), v.push(g.extendParams(r, n, P));
|
|
1312
1312
|
} else {
|
|
1313
1313
|
const g = n.pbrMetallicRoughness || {};
|
|
@@ -1359,7 +1359,7 @@ class et {
|
|
|
1359
1359
|
loadGeometries(A) {
|
|
1360
1360
|
const P = this, t = this.extensions, e = this.primitiveCache;
|
|
1361
1361
|
function n(r) {
|
|
1362
|
-
return t[
|
|
1362
|
+
return t[i.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, P).then(function(B) {
|
|
1363
1363
|
return eP(B, r, P);
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
@@ -1370,7 +1370,7 @@ class et {
|
|
|
1370
1370
|
s.push(g.promise);
|
|
1371
1371
|
else {
|
|
1372
1372
|
let C;
|
|
1373
|
-
v.extensions && v.extensions[
|
|
1373
|
+
v.extensions && v.extensions[i.KHR_DRACO_MESH_COMPRESSION] ? C = n(v) : C = eP(new VP(), v, P), e[c] = { primitive: v, promise: C }, s.push(C);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
return Promise.all(s);
|
|
@@ -1484,7 +1484,7 @@ class et {
|
|
|
1484
1484
|
Promise.all(c)
|
|
1485
1485
|
]).then(function(g) {
|
|
1486
1486
|
const C = g[0], D = g[1], Q = g[2], I = g[3], l = g[4], T = [];
|
|
1487
|
-
for (let a = 0,
|
|
1487
|
+
for (let a = 0, p = C.length; a < p; a++) {
|
|
1488
1488
|
const E = C[a], d = D[a], y = Q[a], k = I[a], W = l[a];
|
|
1489
1489
|
if (E === void 0) continue;
|
|
1490
1490
|
E.updateMatrix && E.updateMatrix();
|
|
@@ -1586,7 +1586,7 @@ class et {
|
|
|
1586
1586
|
const v = (c) => {
|
|
1587
1587
|
const g = /* @__PURE__ */ new Map();
|
|
1588
1588
|
for (const [C, D] of e.associations)
|
|
1589
|
-
(C instanceof
|
|
1589
|
+
(C instanceof pA || C instanceof xA) && g.set(C, D);
|
|
1590
1590
|
return c.traverse((C) => {
|
|
1591
1591
|
const D = e.associations.get(C);
|
|
1592
1592
|
D != null && g.set(C, D);
|
|
@@ -1739,10 +1739,10 @@ const nt = /* @__PURE__ */ G({
|
|
|
1739
1739
|
C(), D();
|
|
1740
1740
|
}, C = () => {
|
|
1741
1741
|
r.position.set(0, 0, -30), r.lookAt(0, 0, 0), B.setSize(100, 100), e.value.appendChild(B.domElement);
|
|
1742
|
-
const
|
|
1743
|
-
s.add(
|
|
1742
|
+
const p = new DA.AmbientLight(16777215, 2);
|
|
1743
|
+
s.add(p), Q();
|
|
1744
1744
|
}, D = () => {
|
|
1745
|
-
new
|
|
1745
|
+
new pe().load(t, (E) => {
|
|
1746
1746
|
v = E.scene, v.rotation.x -= Math.PI / 2, s.add(v), T();
|
|
1747
1747
|
}, (E) => {
|
|
1748
1748
|
console.info("已下载:" + E.loaded / E.total * 100 + "%");
|
|
@@ -1754,9 +1754,9 @@ const nt = /* @__PURE__ */ G({
|
|
|
1754
1754
|
}, I = () => {
|
|
1755
1755
|
P.customTouch ? n("resetClick", null) : l();
|
|
1756
1756
|
}, l = () => {
|
|
1757
|
-
var
|
|
1757
|
+
var p, E;
|
|
1758
1758
|
P.viewer && P.viewer.trackedEntity || (E = P.viewer) == null || E.camera.setView({
|
|
1759
|
-
destination: (
|
|
1759
|
+
destination: (p = P.viewer) == null ? void 0 : p.camera.position,
|
|
1760
1760
|
orientation: {
|
|
1761
1761
|
heading: 0,
|
|
1762
1762
|
pitch: Y.toRadians(-90),
|
|
@@ -1764,17 +1764,17 @@ const nt = /* @__PURE__ */ G({
|
|
|
1764
1764
|
}
|
|
1765
1765
|
});
|
|
1766
1766
|
}, T = () => {
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1767
|
+
const p = P.viewer;
|
|
1768
|
+
p.camera.percentageChanged = 1e-3, c = p.camera.changed.addEventListener(a);
|
|
1769
1769
|
}, a = () => {
|
|
1770
1770
|
var d, y;
|
|
1771
|
-
let
|
|
1772
|
-
v.rotation.y =
|
|
1771
|
+
let p = (d = P.viewer) == null ? void 0 : d.camera.heading, E = (y = P.viewer) == null ? void 0 : y.camera.pitch;
|
|
1772
|
+
v.rotation.y = p, v.rotation.x = E;
|
|
1773
1773
|
};
|
|
1774
1774
|
return sA(() => {
|
|
1775
|
-
var
|
|
1776
|
-
c && ((
|
|
1777
|
-
}), (
|
|
1775
|
+
var p;
|
|
1776
|
+
c && ((p = P.viewer) == null || p.camera.changed.removeEventListener(a));
|
|
1777
|
+
}), (p, E) => (b(), f("div", {
|
|
1778
1778
|
ref_key: "compassContainer",
|
|
1779
1779
|
ref: e,
|
|
1780
1780
|
class: "cp-porket-compass",
|
|
@@ -1890,7 +1890,7 @@ const nt = /* @__PURE__ */ G({
|
|
|
1890
1890
|
version: "1.1"
|
|
1891
1891
|
}, Tt = ["fill"], zt = ["fill"], Et = ["fill", "stroke"], ot = ["fill"], at = /* @__PURE__ */ G({
|
|
1892
1892
|
__name: "Index",
|
|
1893
|
-
props: /* @__PURE__ */
|
|
1893
|
+
props: /* @__PURE__ */ pP({
|
|
1894
1894
|
viewer: {
|
|
1895
1895
|
// Cesium Viewer 实例
|
|
1896
1896
|
type: _
|
|
@@ -2015,7 +2015,7 @@ const nt = /* @__PURE__ */ G({
|
|
|
2015
2015
|
[lA, A.value && B.value]
|
|
2016
2016
|
]);
|
|
2017
2017
|
}
|
|
2018
|
-
}),
|
|
2018
|
+
}), it = /* @__PURE__ */ X(at, [["__scopeId", "data-v-8d46cebf"]]), pt = /* @__PURE__ */ G({
|
|
2019
2019
|
__name: "Index",
|
|
2020
2020
|
props: {
|
|
2021
2021
|
viewer: {
|
|
@@ -2107,8 +2107,8 @@ const nt = /* @__PURE__ */ G({
|
|
|
2107
2107
|
if (l && l.id && l.id.properties) {
|
|
2108
2108
|
let a = l.id.properties.getValue();
|
|
2109
2109
|
if (RA == a.cpType && r.value == l.id.id) {
|
|
2110
|
-
const
|
|
2111
|
-
let E = V.fromCartesian(
|
|
2110
|
+
const p = l.id.position.getValue();
|
|
2111
|
+
let E = V.fromCartesian(p);
|
|
2112
2112
|
const d = Y.toDegrees(E.longitude), y = Y.toDegrees(E.latitude);
|
|
2113
2113
|
let k = U.fromDegrees(d, y, 15e3);
|
|
2114
2114
|
I.camera.flyTo({
|
|
@@ -2127,7 +2127,7 @@ const nt = /* @__PURE__ */ G({
|
|
|
2127
2127
|
tP(Q.$slots, "default", { style: "margin-top:-5px" }, void 0, !0)
|
|
2128
2128
|
], 4)) : AA("", !0);
|
|
2129
2129
|
}
|
|
2130
|
-
}), ut = /* @__PURE__ */ X(
|
|
2130
|
+
}), ut = /* @__PURE__ */ X(pt, [["__scopeId", "data-v-0e7fc65f"]]), Mt = { class: "cp-layersmap-header" }, ft = { class: "cp-layersmap-main" }, bt = ["onClick"], mt = {
|
|
2131
2131
|
key: 0,
|
|
2132
2132
|
class: "cp-layersmap-main-footer"
|
|
2133
2133
|
}, dt = ["checked", "onChange"], yt = ["src"], kt = /* @__PURE__ */ G({
|
|
@@ -2137,7 +2137,7 @@ const nt = /* @__PURE__ */ G({
|
|
|
2137
2137
|
type: _
|
|
2138
2138
|
},
|
|
2139
2139
|
layersManager: {
|
|
2140
|
-
type:
|
|
2140
|
+
type: ie,
|
|
2141
2141
|
required: !0
|
|
2142
2142
|
},
|
|
2143
2143
|
layersData: {
|
|
@@ -2425,10 +2425,10 @@ const qt = "data:image/gif;base64,R0lGODlhyADIAPcAAAAAAObm5ufn5+jo6Onp6erq6uvr6+
|
|
|
2425
2425
|
});
|
|
2426
2426
|
}, a = () => {
|
|
2427
2427
|
c.value || (B.value = !0, I.viewer.clock.shouldAnimate = !0);
|
|
2428
|
-
},
|
|
2428
|
+
}, p = () => {
|
|
2429
2429
|
c.value || (B.value = !1, I.viewer.clock.shouldAnimate = !1);
|
|
2430
2430
|
}, E = () => {
|
|
2431
|
-
|
|
2431
|
+
p(), C.stop(), I.viewer.clock.multiplier = 1, I.viewer.clock.currentTime = I.viewer.clock.startTime.clone();
|
|
2432
2432
|
}, d = () => {
|
|
2433
2433
|
c.value || C.speedUp();
|
|
2434
2434
|
}, y = () => {
|
|
@@ -2453,8 +2453,8 @@ const qt = "data:image/gif;base64,R0lGODlhyADIAPcAAAAAAObm5ufn5+jo6Onp6erq6uvr6+
|
|
|
2453
2453
|
ratio: KA
|
|
2454
2454
|
};
|
|
2455
2455
|
if (H % 10 == 0 && (aA.major = !0, H != 0 && H != m)) {
|
|
2456
|
-
const aP = C == null ? void 0 : C.getDataSource(),
|
|
2457
|
-
aA.label = CA(
|
|
2456
|
+
const aP = C == null ? void 0 : C.getDataSource(), iP = Ot(KA, aP);
|
|
2457
|
+
aA.label = CA(iP);
|
|
2458
2458
|
}
|
|
2459
2459
|
t.value.push(aA);
|
|
2460
2460
|
}
|
|
@@ -2492,7 +2492,7 @@ const qt = "data:image/gif;base64,R0lGODlhyADIAPcAAAAAAObm5ufn5+jo6Onp6erq6uvr6+
|
|
|
2492
2492
|
B.value ? (b(), f("div", {
|
|
2493
2493
|
key: 1,
|
|
2494
2494
|
style: j({ cursor: c.value ? "not-allowed" : "pointer" }),
|
|
2495
|
-
onClick: o[1] || (o[1] = (m) =>
|
|
2495
|
+
onClick: o[1] || (o[1] = (m) => p())
|
|
2496
2496
|
}, [
|
|
2497
2497
|
z("img", { src: O(Kt) }, null, 8, $t)
|
|
2498
2498
|
], 4)) : AA("", !0),
|
|
@@ -2896,10 +2896,10 @@ const En = [
|
|
|
2896
2896
|
{ name: "CpCompass", component: st },
|
|
2897
2897
|
{ name: "CpRuler", component: vt },
|
|
2898
2898
|
{ name: "CpCoord", component: Ct },
|
|
2899
|
-
{ name: "CpOverlay", component:
|
|
2899
|
+
{ name: "CpOverlay", component: it },
|
|
2900
2900
|
{ name: "CpPin", component: ut },
|
|
2901
|
-
{ name: "
|
|
2902
|
-
{ name: "
|
|
2901
|
+
{ name: "CpLayersPicker", component: jt },
|
|
2902
|
+
{ name: "CpLayersSplit", component: Lt },
|
|
2903
2903
|
{ name: "CpCzmlPlayer", component: Tn }
|
|
2904
2904
|
], on = (w) => (En.forEach(({ name: A, component: P }) => {
|
|
2905
2905
|
w.component(A, P);
|
|
@@ -2912,7 +2912,7 @@ export {
|
|
|
2912
2912
|
bn as Clipper,
|
|
2913
2913
|
Sn as DRAWER_MODE,
|
|
2914
2914
|
On as DRAW_STATUS,
|
|
2915
|
-
|
|
2915
|
+
ie as LayersManager,
|
|
2916
2916
|
Nn as LineGaguger,
|
|
2917
2917
|
FA as PIN_CATEGORY,
|
|
2918
2918
|
rA as PIN_MODE,
|
|
@@ -2926,8 +2926,8 @@ export {
|
|
|
2926
2926
|
Ct as cpCoord,
|
|
2927
2927
|
Tn as cpCzmlPlayer,
|
|
2928
2928
|
jt as cpLayersPicker,
|
|
2929
|
-
Lt as
|
|
2930
|
-
|
|
2929
|
+
Lt as cpLayersSplit,
|
|
2930
|
+
it as cpOverlay,
|
|
2931
2931
|
ut as cpPin,
|
|
2932
2932
|
vt as cpRuler,
|
|
2933
2933
|
dn as default
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@ export declare class CP2dDrawer extends DataCenter {
|
|
|
33
33
|
start(): void;
|
|
34
34
|
getEntity(): Entity | null | undefined;
|
|
35
35
|
getPositions(): Cartesian3[];
|
|
36
|
+
setPositions(cartesian3: Cartesian3[]): void;
|
|
36
37
|
clearAll(): void;
|
|
37
38
|
private r_ClickEvent;
|
|
38
39
|
private l_ClickEvent;
|
|
@@ -24,6 +24,7 @@ export declare class CircleDrawer extends DataCenter {
|
|
|
24
24
|
start(): void;
|
|
25
25
|
getEntity(): Entity | null;
|
|
26
26
|
getPositions(): Cartesian3[];
|
|
27
|
+
setPositions(startPoint: Cartesian3, endPoint: Cartesian3): void;
|
|
27
28
|
clearAll(): void;
|
|
28
29
|
private circle_L_ClickEvent;
|
|
29
30
|
private setAngle;
|
|
@@ -24,6 +24,12 @@ export declare class RectDrawer extends DataCenter {
|
|
|
24
24
|
start(): void;
|
|
25
25
|
getEntity(): void;
|
|
26
26
|
getPositions(): Cartesian3[];
|
|
27
|
+
/**
|
|
28
|
+
* 根据数据直接生成图形
|
|
29
|
+
* @param startPoint 起始点坐标
|
|
30
|
+
* @param endPoint 结束点坐标
|
|
31
|
+
*/
|
|
32
|
+
setPositions(startPoint: Cartesian3, endPoint: Cartesian3): void;
|
|
27
33
|
clearAll(): void;
|
|
28
34
|
private rect_L_ClickEvent;
|
|
29
35
|
private rect_L_DownEvent;
|