cesium-pocket 0.5.4-alpha → 0.5.6-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-DClMwtZ9.js → CircleDrawer-CqX1Jptk.js} +9 -9
- package/{PolygonGaguger-Brzz7_9X.js → PolygonGaguger-BE5zUsu1.js} +1 -1
- package/drawer.d.ts +6 -6
- package/drawer.js +1 -1
- package/gauger.d.ts +5 -5
- package/gauger.js +1 -1
- package/index.css +1 -1
- package/index.d.ts +5 -5
- package/index.js +3 -3
- package/package.json +1 -1
- package/src/czml/index.d.ts +0 -0
- package/src/czml/player/CzmlManager.d.ts +3 -3
- package/src/czml/util.d.ts +1 -1
- package/src/drawer/CP2dDrawer.d.ts +3 -3
- package/src/drawer/CircleDrawer.d.ts +2 -2
- package/src/drawer/DataCenter.d.ts +6 -6
- package/src/drawer/PointDrawer.d.ts +2 -2
- package/src/drawer/util.d.ts +9 -0
- package/src/gauger/CircleGaguger.d.ts +1 -1
- package/src/gauger/PointGaguger.d.ts +2 -2
- package/src/gauger/RectGaguger.d.ts +1 -1
- package/src/layersMap/index.d.ts +9 -0
- package/src/pin/index.d.ts +15 -15
- package/src/tianmap/index.d.ts +7 -6
- package/src/transformer/enu.d.ts +2 -0
- package/util/AutoStartStop.d.ts +30 -0
- package/util/coordinate.d.ts +3 -3
- package/util/timmer.d.ts +16 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomDataSource as O, Cartesian3 as r, JulianDate as U, defined as h, HeightReference as M, Color as E, EntityCollection as N, ScreenSpaceEventType as c, ConstantPositionProperty as A, ScreenSpaceEventHandler as C, VerticalOrigin as G, KeyboardEventModifier as b, PolylineDashMaterialProperty as x, CallbackProperty as
|
|
1
|
+
import { CustomDataSource as O, Cartesian3 as r, JulianDate as U, defined as h, HeightReference as M, Color as E, EntityCollection as N, ScreenSpaceEventType as c, ConstantPositionProperty as A, ScreenSpaceEventHandler as C, VerticalOrigin as G, KeyboardEventModifier as b, PolylineDashMaterialProperty as x, CallbackProperty as f, PolygonHierarchy as B, Cartographic as P, Transforms as F, Matrix4 as m, EllipsoidGeodesic as Q } from "cesium";
|
|
2
2
|
import { toRaw as u } from "vue";
|
|
3
3
|
const l = {
|
|
4
4
|
STOPED: Symbol("STOPED"),
|
|
@@ -89,7 +89,7 @@ class W {
|
|
|
89
89
|
const K = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AexdfYwkR3V/r3dnb884wUd03O1HTrZj4p09/CFMSBwpkqX8Ayjkj6ALQY6ixHIc8REJRUoiJUK+80eI7QQH28IOR+xIxOGwyCVRIHEE2JgD6cAfCPt2d9b4ZMt3O7uAfUYceG9ndrp4r6d1N7eeme7prq7q6np7VdvdVa/e+73f699M983OTADyIwwIAwMZEIEMpEYmhAEAEYicBcLAEAZEIEPIkSlhQAQi54AwMISBAgUyJKpMCQOOMCACcaRQAtMOAyIQO7xLVEcYEIE4UiiBaYcBEYgd3iWqIwy4KRBHyBWY7jMgAnG/hpJBgQyIQAokV1y7z4AIxP0aSgYFMiACKZBcce0+AyKQLTWUQ2GglwERSC8bsi8MbGFABLKFEDkUBnoZEIH0siH7wsAWBkQgWwiRQ2GglwERSC8bxe6LdwcZEIE4WDSBbI4BEYgBrmfV7PbZjcuvnNqY+73pdv2vplv1g1Ot+uO0fZL6IvWXqZ+ivhF33ucxnnsytj3Ia9kH+2KfBqB7H0IEUsApsOvM2y6d2Zj//Zl2/W464b8btn/h9RCD7yHif4CCOyjkjQhwHQC8k3qd+i9T30F9Iu68z2M8987Y9kZeyz7YF/tk3xyDY3FMWitNMwMiEE2E7m7t/bXpjfqdU636c2PB+HGF6gtKwccA4Goo7udqjsGxOCbHZgy7CUtxIf3yLALJUe9da1e+aaY198dTG/UvBxB+BxD+kh7t357DZcal3WVRbMLAWBgTY2OM3Vn5nYUBEUgG1natX34J3Q/cMvaW9jEF+BAivDeDm0K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SGZABJLMkT6LWrCfnOX5ctDT0PVBbqSZYCAwEURidBlo4uLL9D9at3aPMvxGuDXykWGp4SWVCScCMVzKZm2Jv4znqQxhn4rXZlgqS7IyIALJylyOdRiqkW/Ys6zJAVGWxgyIQGIiTG5WJhtfQoDPpY3Jtrwmrb3Y6WNABKKPy5E8BeEYP4uk+XLQM7HtSP7FWA8DIhA9PI7s5cTkseMKVeK7D9mGbUcOUNkFZhMTgZjl+7xoq7XGJ0Cp75032HtAc5FN75jsG2VABGKU7n7BkF8b6TdBY8PmaFpa4QyIQAqneHiA5ral/yKLz1Pf2j4fz20dl2ODDIhADJI9MFQY8g17p2e+A92xniHZtcGACMQG61tiNieXlxGBRRLN8D6PRQfyyxwDfSKJQPqQYmNopbbEf4KyQLEX4n3alWabARGI7Qr0xMcg2M+9Z0h2LTMQWI4v4XsYWBlf+CL3niHZtcyACMRyASR8uRkQgZS7PoLOMgO6BGI5DQkvDBTDgAikGF7Fa0UYEIFUpJCSRjEMiECK4VW8VoQBEUhFCilpFMOAAwIpJnHxKgykYUAEkoYlsfGWARGIt6WXxNMwIAJJw5LYeMuACMTb0kviaRjwWyBpGBIbrxkQgXhdfkk+iQERSBJDMu81AyIQr8svyScxIAJJYkjmvWZABFJQ+cVtNRj4OQAAAP//gm46zwAAAAZJREFUAwB1f5TcL2bFTAAAAABJRU5ErkJggg==";
|
|
90
90
|
class S extends W {
|
|
91
91
|
constructor(e) {
|
|
92
|
-
super(e), this.mainData = [], this.dataSource = new O("drawerDataSource"), this.currentDragPoint = null, this.currentIndex = -1, this.
|
|
92
|
+
super(e), this.mainData = [], this.dataSource = new O("drawerDataSource"), this.currentDragPoint = null, this.currentIndex = -1, this.viewer.dataSources.add(this.dataSource);
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* 获取DataSource
|
|
@@ -346,7 +346,7 @@ class Z extends S {
|
|
|
346
346
|
}),
|
|
347
347
|
show: !0,
|
|
348
348
|
clampToGround: !0
|
|
349
|
-
}, i.positions = new
|
|
349
|
+
}, i.positions = new f(() => {
|
|
350
350
|
let a = this.mainData.length, n = this.mainData[a - 1];
|
|
351
351
|
return n || (n = this.mainData[a - 2]), this.dashEndData ? [n, this.dashEndData] : [n, new r()];
|
|
352
352
|
}, !1), this.dashLineEntity = this.viewer.entities.add({
|
|
@@ -355,7 +355,7 @@ class Z extends S {
|
|
|
355
355
|
entityType: "DASHLINE"
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
|
-
}, t && (t.drawerMode && (this.drawerMode = t.drawerMode), this.point = t.point, this.polyline = t.polyline, this.deshline = t.deshline, this.polygon = t.polygon, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.movingCallbackFun && (this.movingCallbackFun = t.movingCallbackFun), t.editCallbackFun && (this.editCallbackFun = t.editCallbackFun), t.delCallbackFun && (this.delCallbackFun = t.delCallbackFun), t.stopDrawCallbackFun && (this.stopDrawCallbackFun = t.stopDrawCallbackFun), this.delConfirmFun = t.delConfirmFun
|
|
358
|
+
}, t && (t.drawerMode && (this.drawerMode = t.drawerMode), this.point = t.point, this.polyline = t.polyline, this.deshline = t.deshline, this.polygon = t.polygon, t.afterAddPointFun && (this.afterAddPointFun = t.afterAddPointFun), t.movingCallbackFun && (this.movingCallbackFun = t.movingCallbackFun), t.editCallbackFun && (this.editCallbackFun = t.editCallbackFun), t.delCallbackFun && (this.delCallbackFun = t.delCallbackFun), t.stopDrawCallbackFun && (this.stopDrawCallbackFun = t.stopDrawCallbackFun), t.delConfirmFun ? this.delConfirmFun = t.delConfirmFun : this.delConfirmFun = this.delCallback);
|
|
359
359
|
}
|
|
360
360
|
start() {
|
|
361
361
|
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();
|
|
@@ -413,7 +413,7 @@ class Z extends S {
|
|
|
413
413
|
// 是否显示
|
|
414
414
|
show: !0,
|
|
415
415
|
clampToGround: !0
|
|
416
|
-
}, e.positions = new
|
|
416
|
+
}, e.positions = new f(() => this.mainData, !1), this.mainLineEntity = this.viewer.entities.add({
|
|
417
417
|
polyline: e,
|
|
418
418
|
properties: {
|
|
419
419
|
entityType: "LINE"
|
|
@@ -427,7 +427,7 @@ class Z extends S {
|
|
|
427
427
|
hierarchy: [new r(), new r(), new r()],
|
|
428
428
|
material: E.RED.withAlpha(0.4),
|
|
429
429
|
outline: !1
|
|
430
|
-
}, e.hierarchy = new
|
|
430
|
+
}, e.hierarchy = new f(() => {
|
|
431
431
|
let t = this.mainData;
|
|
432
432
|
return this.dashEndData && (t = [...this.mainData, this.dashEndData]), new B(t);
|
|
433
433
|
}, !1), this.mainPolygonEntity = this.viewer.entities.add({
|
|
@@ -508,7 +508,7 @@ class V extends S {
|
|
|
508
508
|
// 是否显示
|
|
509
509
|
show: !0,
|
|
510
510
|
clampToGround: !0
|
|
511
|
-
}, e.positions = new
|
|
511
|
+
}, e.positions = new f(() => [...this.mainData, this.mainData[0]], !1), this.lineEntity = this.viewer.entities.add({
|
|
512
512
|
polyline: e,
|
|
513
513
|
properties: {
|
|
514
514
|
entityType: "LINE"
|
|
@@ -522,7 +522,7 @@ class V extends S {
|
|
|
522
522
|
hierarchy: [new r(), new r(), new r()],
|
|
523
523
|
material: E.RED.withAlpha(0.4),
|
|
524
524
|
outline: !1
|
|
525
|
-
}, e.hierarchy = new
|
|
525
|
+
}, e.hierarchy = new f(() => new B(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
|
|
526
526
|
polygon: e,
|
|
527
527
|
properties: {
|
|
528
528
|
entityType: "POLYGON"
|
|
@@ -618,7 +618,7 @@ class X extends S {
|
|
|
618
618
|
outline: !0,
|
|
619
619
|
// 是否显示边框
|
|
620
620
|
outlineColor: E.RED
|
|
621
|
-
}, e.semiMinorAxis = e.semiMajorAxis = new
|
|
621
|
+
}, e.semiMinorAxis = e.semiMajorAxis = new f(() => this.distance, !1), this.ellipseEntity = this.viewer.entities.add({
|
|
622
622
|
position: new A(this.firstPoint),
|
|
623
623
|
ellipse: e,
|
|
624
624
|
properties: {
|
|
@@ -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-CqX1Jptk.js";
|
|
3
3
|
const A = (r, t) => {
|
|
4
4
|
const l = v.fromCartesian(r), e = v.fromCartesian(t);
|
|
5
5
|
return new Y(l, e).surfaceDistance;
|
package/drawer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PointDrawer } from './src/drawer/PointDrawer
|
|
2
|
-
import { CP2dDrawer, CP2dOptions, DRAWER_MODE, DRAWER_MODE_TYPE } from './src/drawer/CP2dDrawer
|
|
3
|
-
import { RectDrawer, RectOptions } from './src/drawer/RectDrawer
|
|
4
|
-
import { CircleDrawer, CircleOptions } from './src/drawer/CircleDrawer
|
|
5
|
-
import { DelConfirmFn } from './src/drawer/DataCenter
|
|
6
|
-
import { DRAW_STATUS, DRAW_STATUS_TYPE } from './src/drawer/DrawerStatus
|
|
1
|
+
import { PointDrawer } from './src/drawer/PointDrawer';
|
|
2
|
+
import { CP2dDrawer, CP2dOptions, DRAWER_MODE, DRAWER_MODE_TYPE } from './src/drawer/CP2dDrawer';
|
|
3
|
+
import { RectDrawer, RectOptions } from './src/drawer/RectDrawer';
|
|
4
|
+
import { CircleDrawer, CircleOptions } from './src/drawer/CircleDrawer';
|
|
5
|
+
import { DelConfirmFn } from './src/drawer/DataCenter';
|
|
6
|
+
import { DRAW_STATUS, DRAW_STATUS_TYPE } from './src/drawer/DrawerStatus';
|
|
7
7
|
export { PointDrawer, CP2dDrawer, RectDrawer, CircleDrawer, DRAW_STATUS, type DRAW_STATUS_TYPE, DRAWER_MODE, type DRAWER_MODE_TYPE, type CircleOptions, type RectOptions, type CP2dOptions, type DelConfirmFn };
|
package/drawer.js
CHANGED
package/gauger.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CircleGaguger, CircleGaugerOptions } from './src/gauger/CircleGaguger
|
|
2
|
-
import { RectGaguger, RectGaugerOptions } from './src/gauger/RectGaguger
|
|
3
|
-
import { PointGauger, PointGaugerOptions } from './src/gauger/PointGaguger
|
|
4
|
-
import { LineGaguger, LineGaugerOptions } from './src/gauger/LineGaguger
|
|
5
|
-
import { PolygonGaguger, PolygonGaugerOptions } from './src/gauger/PolygonGaguger
|
|
1
|
+
import { CircleGaguger, CircleGaugerOptions } from './src/gauger/CircleGaguger';
|
|
2
|
+
import { RectGaguger, RectGaugerOptions } from './src/gauger/RectGaguger';
|
|
3
|
+
import { PointGauger, PointGaugerOptions } from './src/gauger/PointGaguger';
|
|
4
|
+
import { LineGaguger, LineGaugerOptions } from './src/gauger/LineGaguger';
|
|
5
|
+
import { PolygonGaguger, PolygonGaugerOptions } from './src/gauger/PolygonGaguger';
|
|
6
6
|
export { CircleGaguger, RectGaguger, PointGauger, LineGaguger, PolygonGaguger, type CircleGaugerOptions, type RectGaugerOptions, type PointGaugerOptions, type LineGaugerOptions, type PolygonGaugerOptions };
|
package/gauger.js
CHANGED
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cp-porket-compass[data-v-52d8d836]{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-
|
|
1
|
+
.cp-porket-compass[data-v-52d8d836]{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-d165d90f]{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-d165d90f]{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-d165d90f]{display:flex;justify-content:space-around;padding-right:2px}.cp-layersmap-layer[data-v-d165d90f]{width:60px;height:60px;position:relative;margin-left:2px;margin-top:2px;margin-bottom:2px;cursor:pointer}.cp-layersmap-layer-header[data-v-d165d90f]{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-d165d90f]{width:60px;height:60px}.cp-layersmap-layer-footer[data-v-d165d90f]{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-d165d90f]{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-4bb4e701]{position:fixed;left:0;bottom:60px;z-index:100;width:60x;background-color:#0006;border-top:1px solid rgb(60,60,60);border-right:1px solid rgb(60,60,60);border-radius:4px;padding:6px;font-size:12px;color:#ccc}.czml-config-title[data-v-4bb4e701]{padding-bottom:6px;border-bottom:1px solid #222222;font-weight:500;font-size:14px}.czml-config-label[data-v-4bb4e701]{color:#87ceeb;padding:4px 0}.czmlBar[data-v-4bb4e701]{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-4bb4e701]{width:220px;-webkit-user-select:none;user-select:none}.control-btns[data-v-4bb4e701]{display:flex;justify-content:space-around;align-items:center;padding-top:8px}.control-btns div[data-v-4bb4e701]{width:22px;height:22px;border-radius:2px;display:flex;justify-content:center;align-items:center;background-color:#ffffff4d}.control-btns img[data-v-4bb4e701]{width:14px}.control-bottom[data-v-4bb4e701]{height:30px;display:flex;justify-content:space-between;align-items:center;padding:0 10px;color:#ff0}.bar-timeline[data-v-4bb4e701]{flex:1 1 auto;padding:10px;position:relative}.timeline-left[data-v-4bb4e701]{position:absolute;top:6px;left:10px}.timeline-right[data-v-4bb4e701]{position:absolute;top:6px;right:10px}.timeline-ruler[data-v-4bb4e701]{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-4bb4e701]{position:absolute;top:-30px;transform:translate(-25%)}.tick[data-v-4bb4e701]{position:absolute;bottom:0;width:0;height:6px;border-left:1px solid rgba(170,180,190,.45);font-size:10px}.grabbing[data-v-4bb4e701]{cursor:grabbing}.tick-major[data-v-4bb4e701]{height:12px;border-left:1px solid rgba(170,180,190,.45)}.playhead[data-v-4bb4e701]{position:absolute;top:0;bottom:0;width:0;z-index:5;transform:translate(-50%);pointer-events:none}.playhead__tri[data-v-4bb4e701]{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-4bb4e701]{position:absolute;top:10px;bottom:0;left:0;width:1px;background:#ff0}@media (max-width: 720px){.czml-config[data-v-4bb4e701]{bottom:120px}.czmlBar[data-v-4bb4e701]{height:120px;flex-direction:column;gap:6px;min-height:0}.bar-control[data-v-4bb4e701]{width:100%;display:flex;justify-content:space-between}.control-btns[data-v-4bb4e701]{width:55%}.control-bottom[data-v-4bb4e701]{flex:1}}
|
package/index.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ import { default as cpTianmap } from './src/tianmap/Index.vue';
|
|
|
7
7
|
import { default as cpCzmlPlayer } from './src/czml/player/Index.vue';
|
|
8
8
|
import { App } from 'vue';
|
|
9
9
|
declare const _default: {
|
|
10
|
-
install: (app: App) => App
|
|
10
|
+
install: (app: App) => App<any>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
13
13
|
export { cpCompass, cpRuler, cpCoord, cpOverlay, cpPin, cpTianmap, cpCzmlPlayer };
|
|
14
|
-
export * from './pin
|
|
15
|
-
export * from './tianmap
|
|
16
|
-
export * from './drawer
|
|
17
|
-
export * from './gauger
|
|
14
|
+
export * from './pin';
|
|
15
|
+
export * from './tianmap';
|
|
16
|
+
export * from './drawer';
|
|
17
|
+
export * from './gauger';
|
package/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import * as IA from "three";
|
|
|
3
3
|
import { TrianglesDrawMode as aP, TriangleFanDrawMode as UA, TriangleStripDrawMode as AP, Loader as uP, LoaderUtils as gA, FileLoader as PP, Color as F, LinearSRGBColorSpace as J, SpotLight as pP, PointLight as iP, DirectionalLight as MP, MeshBasicMaterial as vA, SRGBColorSpace as wA, MeshPhysicalMaterial as q, Vector2 as eP, Matrix4 as TA, Vector3 as PA, Quaternion as tP, InstancedMesh as bP, InstancedBufferAttribute as fP, Object3D as nP, TextureLoader as dP, ImageBitmapLoader as mP, BufferAttribute as oA, InterleavedBuffer as yP, InterleavedBufferAttribute as UP, LinearMipmapLinearFilter as sP, NearestMipmapLinearFilter as jP, LinearMipmapNearestFilter as kP, NearestMipmapNearestFilter as LP, LinearFilter as jA, NearestFilter as rP, RepeatWrapping as kA, MirroredRepeatWrapping as SP, ClampToEdgeWrapping as HP, PointsMaterial as OP, Material as aA, LineBasicMaterial as qP, MeshStandardMaterial as BP, DoubleSide as hP, PropertyBinding as VP, BufferGeometry as JP, SkinnedMesh as KP, Mesh as YP, LineSegments as NP, Line as ZP, LineLoop as xP, Points as GP, Group as uA, PerspectiveCamera as XP, MathUtils as WP, OrthographicCamera as FP, Skeleton as RP, AnimationClip as _P, Bone as $P, InterpolateDiscrete as Ae, InterpolateLinear as vP, ColorManagement as JA, Texture as KA, VectorKeyframeTrack as YA, NumberKeyframeTrack as NA, QuaternionKeyframeTrack as ZA, FrontSide as Pe, Interpolant as ee, Box3 as te, Sphere as ne } from "three";
|
|
4
4
|
import { Viewer as x, Math as cA, Cartesian2 as QA, Cartesian3 as Y, Cartographic as gP, SceneTransforms as se, Ray as re, Color as Be, ScreenSpaceEventType as pA, ScreenSpaceEventHandler as ve, createWorldTerrainAsync as ge, EllipsoidTerrainProvider as Ce, WebMapTileServiceImageryProvider as _, Credit as $, JulianDate as V, CzmlDataSource as we } from "cesium";
|
|
5
5
|
import { P as rA, a as xA, b as ce, c as De, d as Ie, C as GA } from "./index-CcaLwHv1.js";
|
|
6
|
-
import { C as un, a as pn, b as Mn, D as bn, P as fn, R as dn } from "./CircleDrawer-
|
|
7
|
-
import { C as yn, L as Un, P as jn, a as kn, R as Ln } from "./PolygonGaguger-
|
|
6
|
+
import { C as un, a as pn, b as Mn, D as bn, P as fn, R as dn } from "./CircleDrawer-CqX1Jptk.js";
|
|
7
|
+
import { C as yn, L as Un, P as jn, a as kn, R as Ln } from "./PolygonGaguger-BE5zUsu1.js";
|
|
8
8
|
function XA(w, A) {
|
|
9
9
|
if (A === aP)
|
|
10
10
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), w;
|
|
@@ -2211,7 +2211,7 @@ const Fe = /* @__PURE__ */ N({
|
|
|
2211
2211
|
])
|
|
2212
2212
|
], 32));
|
|
2213
2213
|
}
|
|
2214
|
-
}), ut = /* @__PURE__ */ G(at, [["__scopeId", "data-v-
|
|
2214
|
+
}), ut = /* @__PURE__ */ G(at, [["__scopeId", "data-v-d165d90f"]]), pt = (w) => {
|
|
2215
2215
|
const A = new _({
|
|
2216
2216
|
url: "http://{s}.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=" + w,
|
|
2217
2217
|
layer: "img",
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Clock, Viewer } from 'cesium';
|
|
1
|
+
import { Clock, DataSource, JulianDate, Viewer } from 'cesium';
|
|
2
2
|
/** 默认可选倍速列表 */
|
|
3
3
|
export declare const DEFAULT_SPEED_OPTIONS: readonly [0.5, 1, 2, 8, 32, 60, 300, 1200, 3600];
|
|
4
4
|
export interface DataItem {
|
|
@@ -26,7 +26,7 @@ export declare class CzmlManager {
|
|
|
26
26
|
getData(): Array<DataItem>;
|
|
27
27
|
setSpeedDirect(speedDirect: boolean): void;
|
|
28
28
|
track(id: string | null): void;
|
|
29
|
-
getDataSource():
|
|
29
|
+
getDataSource(): DataSource | undefined;
|
|
30
30
|
getStartTime(): string;
|
|
31
31
|
getStopTime(): string;
|
|
32
32
|
getCurrentTime(): string;
|
|
@@ -35,5 +35,5 @@ export declare class CzmlManager {
|
|
|
35
35
|
stop(): void;
|
|
36
36
|
private setSpeed;
|
|
37
37
|
getCurrentRatio(clock: Clock): number;
|
|
38
|
-
percentToTime(clock: Clock, percent: number):
|
|
38
|
+
percentToTime(clock: Clock, percent: number): JulianDate | null;
|
|
39
39
|
}
|
package/src/czml/util.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare const formatDatetime: (julianDate: JulianDate) => string;
|
|
|
7
7
|
* @param {JulianDate} stopTime 动画结束时间
|
|
8
8
|
* @returns {JulianDate} 目标时间点
|
|
9
9
|
*/
|
|
10
|
-
export declare const percentToJulianDate: (percent: number, dataSource: DataSource) =>
|
|
10
|
+
export declare const percentToJulianDate: (percent: number, dataSource: DataSource) => JulianDate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cartesian3, Viewer, PolylineGraphics, PolygonGraphics, PointGraphics } from 'cesium';
|
|
2
|
-
import { DataCenter, AddCallbackFn, MovingCallbackFn, DelConfirmFn, NoPropCallbackFn, EditCallbackFn } from './DataCenter
|
|
1
|
+
import { Cartesian3, Viewer, Entity, PolylineGraphics, PolygonGraphics, PointGraphics } from 'cesium';
|
|
2
|
+
import { DataCenter, AddCallbackFn, MovingCallbackFn, DelConfirmFn, NoPropCallbackFn, EditCallbackFn } from './DataCenter';
|
|
3
3
|
export declare const DRAWER_MODE: {
|
|
4
4
|
readonly LINE: symbol;
|
|
5
5
|
readonly POLYGON: symbol;
|
|
@@ -31,7 +31,7 @@ export declare class CP2dDrawer extends DataCenter {
|
|
|
31
31
|
private stopDrawCallbackFun;
|
|
32
32
|
constructor(viewer: Viewer, options?: CP2dOptions);
|
|
33
33
|
start(): void;
|
|
34
|
-
getEntity():
|
|
34
|
+
getEntity(): Entity | null | undefined;
|
|
35
35
|
getPositions(): Cartesian3[];
|
|
36
36
|
clearAll(): void;
|
|
37
37
|
private r_ClickEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cartesian3, Viewer, EllipseGraphics, PointGraphics } from 'cesium';
|
|
1
|
+
import { Cartesian3, Viewer, Entity, EllipseGraphics, PointGraphics } from 'cesium';
|
|
2
2
|
import { DataCenter } from './DataCenter';
|
|
3
3
|
export type CircleCallbackFn = (startPoint: Cartesian3, endPoint: Cartesian3) => void;
|
|
4
4
|
export type CircleOptions = {
|
|
@@ -22,7 +22,7 @@ export declare class CircleDrawer extends DataCenter {
|
|
|
22
22
|
private circleEditFun;
|
|
23
23
|
constructor(viewer: Viewer, options?: CircleOptions);
|
|
24
24
|
start(): void;
|
|
25
|
-
getEntity():
|
|
25
|
+
getEntity(): Entity | null;
|
|
26
26
|
getPositions(): Cartesian3[];
|
|
27
27
|
clearAll(): void;
|
|
28
28
|
private circle_L_ClickEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cartesian3, Entity, PointGraphics, Viewer } from 'cesium';
|
|
1
|
+
import { Cartesian3, CustomDataSource, Entity, PointGraphics, Viewer } from 'cesium';
|
|
2
2
|
import { DrawerStatus } from './DrawerStatus';
|
|
3
3
|
export type AddCallbackFn = (entity: Entity) => void;
|
|
4
4
|
export type MovingCallbackFn = (cartesian: Cartesian3) => void;
|
|
@@ -7,7 +7,7 @@ export type DelConfirmFn = () => Promise<boolean>;
|
|
|
7
7
|
export type NoPropCallbackFn = () => void;
|
|
8
8
|
export declare class DataCenter extends DrawerStatus {
|
|
9
9
|
protected mainData: Cartesian3[];
|
|
10
|
-
protected dataSource:
|
|
10
|
+
protected dataSource: CustomDataSource;
|
|
11
11
|
protected currentDragPoint: Entity | null;
|
|
12
12
|
protected currentIndex: number;
|
|
13
13
|
protected point: PointGraphics.ConstructorOptions | undefined;
|
|
@@ -15,13 +15,13 @@ export declare class DataCenter extends DrawerStatus {
|
|
|
15
15
|
protected movingCallbackFun: MovingCallbackFn | undefined;
|
|
16
16
|
protected editCallbackFun: EditCallbackFn | undefined;
|
|
17
17
|
protected delCallbackFun: NoPropCallbackFn | undefined;
|
|
18
|
-
protected delConfirmFun: DelConfirmFn;
|
|
18
|
+
protected delConfirmFun: DelConfirmFn | undefined;
|
|
19
19
|
constructor(viewer: Viewer);
|
|
20
20
|
/**
|
|
21
21
|
* 获取DataSource
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
getDataSource():
|
|
24
|
+
getDataSource(): CustomDataSource;
|
|
25
25
|
/**
|
|
26
26
|
* 根据dataSource更新mainData
|
|
27
27
|
* @returns Cartesian3[]
|
|
@@ -31,11 +31,11 @@ export declare class DataCenter extends DrawerStatus {
|
|
|
31
31
|
* 根据mainData更新dataSource
|
|
32
32
|
* @returns Cartesian3[]
|
|
33
33
|
*/
|
|
34
|
-
protected MdToDs():
|
|
34
|
+
protected MdToDs(): CustomDataSource;
|
|
35
35
|
protected clearAllData(): void;
|
|
36
36
|
protected getEntityIndex(): void;
|
|
37
37
|
protected deleteMoveFun(event: any): void;
|
|
38
|
-
protected addPoint(cartesian: Cartesian3):
|
|
38
|
+
protected addPoint(cartesian: Cartesian3): Entity;
|
|
39
39
|
protected deletePoint(entity: Entity): void;
|
|
40
40
|
protected delCallback(): Promise<boolean>;
|
|
41
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cartesian3, Viewer, Entity } from 'cesium';
|
|
2
|
-
import { DataCenter, AddCallbackFn, DelConfirmFn } from './DataCenter
|
|
1
|
+
import { Cartesian3, Viewer, Entity, EntityCollection } from 'cesium';
|
|
2
|
+
import { DataCenter, AddCallbackFn, DelConfirmFn } from './DataCenter';
|
|
3
3
|
export type EditBillboardFn = (cartesian: Cartesian3, entity: Entity) => void;
|
|
4
4
|
export type EntityCallbackFn = (cartesian: Cartesian3) => Entity;
|
|
5
5
|
export type PointOptions = {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Cartesian3, Label, Viewer } from 'cesium';
|
|
2
|
+
export declare const getTimeStr: () => string;
|
|
3
|
+
export declare const getGroundDistance: (cartesian1: Cartesian3, cartesian2: Cartesian3) => number;
|
|
4
|
+
export declare const getCenterPosition: (cartesian1: Cartesian3, cartesian2: Cartesian3) => Cartesian3;
|
|
5
|
+
export declare const getTextlabel: (viewer: Viewer, cartesian: Cartesian3, text: string, label?: Label | null) => import('cesium').Entity;
|
|
6
|
+
export declare const getDistanceLabel: (distance: number) => string;
|
|
7
|
+
export declare const getAreaLabel: (area: number) => string;
|
|
8
|
+
export declare const getCentroid: (positions: Cartesian3[]) => Cartesian3 | null;
|
|
9
|
+
export declare const calculatePlanarArea: (positions: Cartesian3[]) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Viewer, Cartesian3, Entity, PointGraphics, PolylineGraphics, PolygonGraphics } from 'cesium';
|
|
2
|
-
import { DelConfirmFn } from '
|
|
2
|
+
import { DelConfirmFn } from '../drawer/DataCenter';
|
|
3
3
|
export type EntityCallbackFn = (cartesian: Cartesian3) => Entity;
|
|
4
4
|
export type CircleGaugerOptions = {
|
|
5
5
|
point?: PointGraphics.ConstructorOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Viewer, Cartesian3, Entity } from 'cesium';
|
|
2
2
|
import { EditBillboardFn } from '../drawer/PointDrawer';
|
|
3
|
-
import { DelConfirmFn } from '
|
|
3
|
+
import { DelConfirmFn } from '../drawer/DataCenter';
|
|
4
4
|
export type EntityCallbackFn = (cartesian: Cartesian3) => Entity;
|
|
5
5
|
export type PointGaugerOptions = {
|
|
6
6
|
addBillboardFun?: EntityCallbackFn;
|
|
@@ -19,7 +19,7 @@ export declare class PointGauger {
|
|
|
19
19
|
setEditStatus(): void;
|
|
20
20
|
setDelStatus(): void;
|
|
21
21
|
clearAll(): void;
|
|
22
|
-
getEntities(): EntityCollection;
|
|
22
|
+
getEntities(): import('cesium').EntityCollection | undefined;
|
|
23
23
|
private init;
|
|
24
24
|
private getLonLatStr;
|
|
25
25
|
private editCallback;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Viewer, Cartesian3, Entity, PointGraphics, PolylineGraphics, PolygonGraphics } from 'cesium';
|
|
2
|
-
import { DelConfirmFn } from '
|
|
2
|
+
import { DelConfirmFn } from '../drawer/DataCenter';
|
|
3
3
|
export type EntityCallbackFn = (cartesian: Cartesian3) => Entity;
|
|
4
4
|
export type RectGaugerOptions = {
|
|
5
5
|
point?: PointGraphics.ConstructorOptions;
|
package/src/pin/index.d.ts
CHANGED
|
@@ -8,55 +8,55 @@ export type PIN_MODE_TYPE = typeof PIN_MODE[keyof typeof PIN_MODE];
|
|
|
8
8
|
export declare const PIN_CATEGORY: {
|
|
9
9
|
readonly HOSPITAL: {
|
|
10
10
|
readonly name: "hospital";
|
|
11
|
-
readonly color:
|
|
11
|
+
readonly color: Color;
|
|
12
12
|
};
|
|
13
13
|
readonly SCHOOL: {
|
|
14
14
|
readonly name: "school-JP";
|
|
15
|
-
readonly color:
|
|
15
|
+
readonly color: Color;
|
|
16
16
|
};
|
|
17
17
|
readonly LIBRARY: {
|
|
18
18
|
readonly name: "library";
|
|
19
|
-
readonly color:
|
|
19
|
+
readonly color: Color;
|
|
20
20
|
};
|
|
21
21
|
readonly BANK: {
|
|
22
22
|
readonly name: "bank-JP";
|
|
23
|
-
readonly color:
|
|
23
|
+
readonly color: Color;
|
|
24
24
|
};
|
|
25
25
|
readonly AIRPORT: {
|
|
26
26
|
readonly name: "airport";
|
|
27
|
-
readonly color:
|
|
27
|
+
readonly color: Color;
|
|
28
28
|
};
|
|
29
29
|
readonly FIRE_STATION: {
|
|
30
30
|
readonly name: "fire-station";
|
|
31
|
-
readonly color:
|
|
31
|
+
readonly color: Color;
|
|
32
32
|
};
|
|
33
33
|
readonly BUS: {
|
|
34
34
|
readonly name: "airport";
|
|
35
|
-
readonly color:
|
|
35
|
+
readonly color: Color;
|
|
36
36
|
};
|
|
37
37
|
readonly GAS_STATION: {
|
|
38
38
|
readonly name: "charging-station";
|
|
39
|
-
readonly color:
|
|
39
|
+
readonly color: Color;
|
|
40
40
|
};
|
|
41
41
|
readonly PARKING: {
|
|
42
42
|
readonly name: "parking";
|
|
43
|
-
readonly color:
|
|
43
|
+
readonly color: Color;
|
|
44
44
|
};
|
|
45
45
|
readonly POLICE: {
|
|
46
46
|
readonly name: "police";
|
|
47
|
-
readonly color:
|
|
47
|
+
readonly color: Color;
|
|
48
48
|
};
|
|
49
49
|
readonly RAIL: {
|
|
50
50
|
readonly name: "rail";
|
|
51
|
-
readonly color:
|
|
51
|
+
readonly color: Color;
|
|
52
52
|
};
|
|
53
53
|
readonly RESTAURANT: {
|
|
54
54
|
readonly name: "restaurant";
|
|
55
|
-
readonly color:
|
|
55
|
+
readonly color: Color;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
export type PIN_CATEGORY_TYPE = typeof PIN_CATEGORY[keyof typeof PIN_CATEGORY];
|
|
59
59
|
export declare const CP_TYPE = "cp-pin";
|
|
60
|
-
export declare const addDefault: (viewer: Viewer, position: Cartesian3, pinCategory: PIN_CATEGORY_TYPE, size?: number) => Promise<
|
|
61
|
-
export declare const addText: (viewer: Viewer, position: Cartesian3, text?: string, color?: Color, size?: number) =>
|
|
62
|
-
export declare const addImg: (viewer: Viewer, position: Cartesian3, iconUrl: string, color?: Color, size?: number) => Promise<
|
|
60
|
+
export declare const addDefault: (viewer: Viewer, position: Cartesian3, pinCategory: PIN_CATEGORY_TYPE, size?: number) => Promise<import('cesium').Entity | null>;
|
|
61
|
+
export declare const addText: (viewer: Viewer, position: Cartesian3, text?: string, color?: Color, size?: number) => import('cesium').Entity;
|
|
62
|
+
export declare const addImg: (viewer: Viewer, position: Cartesian3, iconUrl: string, color?: Color, size?: number) => Promise<import('cesium').Entity | null>;
|
package/src/tianmap/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { WebMapTileServiceImageryProvider } from 'cesium';
|
|
1
2
|
export declare const initImageryLayers: (token: string) => {
|
|
2
|
-
tian_image:
|
|
3
|
-
tian_image_sign:
|
|
4
|
-
tian_vector:
|
|
5
|
-
tian_vector_sign:
|
|
6
|
-
tian_terrain:
|
|
7
|
-
tian_terrain_sign:
|
|
3
|
+
tian_image: WebMapTileServiceImageryProvider;
|
|
4
|
+
tian_image_sign: WebMapTileServiceImageryProvider;
|
|
5
|
+
tian_vector: WebMapTileServiceImageryProvider;
|
|
6
|
+
tian_vector_sign: WebMapTileServiceImageryProvider;
|
|
7
|
+
tian_terrain: WebMapTileServiceImageryProvider;
|
|
8
|
+
tian_terrain_sign: WebMapTileServiceImageryProvider;
|
|
8
9
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Event, Viewer } from 'cesium';
|
|
2
|
+
/**
|
|
3
|
+
* @param viewer
|
|
4
|
+
* @param callback 启动postrender后执行的函数
|
|
5
|
+
* @param timesec 多少秒后自动注销postrender事件
|
|
6
|
+
*/
|
|
7
|
+
export declare class AutoStartStop {
|
|
8
|
+
timeNow: number;
|
|
9
|
+
eventBounding: boolean;
|
|
10
|
+
viewer: Viewer;
|
|
11
|
+
callback: Event.RemoveCallback;
|
|
12
|
+
timesec: number;
|
|
13
|
+
constructor(viewer: Viewer, callback: Event.RemoveCallback, timesec: number);
|
|
14
|
+
/**
|
|
15
|
+
* 自动启停开启
|
|
16
|
+
*/
|
|
17
|
+
start(): void;
|
|
18
|
+
/**
|
|
19
|
+
* 自动启停销毁
|
|
20
|
+
*/
|
|
21
|
+
destory(): void;
|
|
22
|
+
/**
|
|
23
|
+
* postRender事件回调函数的代理回调函数,箭头函数获取this
|
|
24
|
+
*/
|
|
25
|
+
private agentCallback;
|
|
26
|
+
/**
|
|
27
|
+
* 相机change事件回调函数,箭头函数获取this
|
|
28
|
+
*/
|
|
29
|
+
private cameraEvent;
|
|
30
|
+
}
|
package/util/coordinate.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Viewer, Cartesian3 } from 'cesium';
|
|
2
2
|
export declare const cartesianToScreen: (viewer: Viewer, cartesian: Cartesian3) => {
|
|
3
|
-
x:
|
|
4
|
-
y:
|
|
5
|
-
};
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
} | null;
|
|
6
6
|
export declare const checkVisibility: (viewer: Viewer, cartesian: Cartesian3) => boolean;
|
package/util/timmer.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 防抖函数:事件触发后延迟执行,连续触发时重置延迟
|
|
3
|
+
* @param func 目标函数
|
|
4
|
+
* @param wait 延迟时间(毫秒)
|
|
5
|
+
*/
|
|
6
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
7
|
+
/**
|
|
8
|
+
* 节流函数:在固定间隔内最多执行一次
|
|
9
|
+
* @param func 目标函数
|
|
10
|
+
* @param limit 时间间隔(毫秒)
|
|
11
|
+
* @param options 配置选项
|
|
12
|
+
*/
|
|
13
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number, options?: {
|
|
14
|
+
leading?: boolean;
|
|
15
|
+
trailing?: boolean;
|
|
16
|
+
}): (...args: Parameters<T>) => void;
|