@skzz/components-gis 0.1.3 → 0.1.5

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.
Files changed (33) hide show
  1. package/dist/assets/twinPreviewWorker-COILIqOa.js +1 -0
  2. package/dist/color-DVYdxZow.js +359 -0
  3. package/dist/esm-BXiGX6xE.js +86 -0
  4. package/dist/index.css +1 -1
  5. package/dist/index.d.ts +71 -6
  6. package/dist/index.es.js +1138 -9563
  7. package/dist/index.umd.js +5 -5
  8. package/dist/interpolation-Ctw2-y9G.js +211 -0
  9. package/dist/layerStack-CbiVJONn.js +181 -0
  10. package/dist/pako.esm-D6zcBi67.js +1455 -0
  11. package/dist/query-DgSNPfJM.js +239 -0
  12. package/dist/queryPoint-BOi_hkig.js +189 -0
  13. package/dist/zz-3dtiles-BzDYB-tW.js +75 -0
  14. package/dist/zz-gltf-BDHxqQjs.js +70 -0
  15. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsCacheUtils.d.ts +53 -0
  16. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsRenderer.d.ts +96 -12
  17. package/dist/zz-layer/zz-layer-zzts/zztsRasterCacheUtils.d.ts +35 -0
  18. package/dist/zz-layer/zz-layer-zzts/zztsRasterPreviewPolling.d.ts +10 -0
  19. package/dist/zz-layer/zz-layer-zzts3dv2/index.vue.d.ts +1 -0
  20. package/dist/zz-layer/zz-layer-zzts3dv2/twinPreviewWorker.d.ts +1 -0
  21. package/dist/zz-layer-geojson-CtTpn_f9.js +867 -0
  22. package/dist/zz-layer-mvt-R1-GwSIW.js +609 -0
  23. package/dist/zz-layer-shp-zzts-D8BjI5tI.js +1323 -0
  24. package/dist/zz-layer-zzts3d-DqZmLdW3.js +835 -0
  25. package/dist/zz-layer-zzts3d-grid-CTHFZBpo.js +314 -0
  26. package/dist/zz-layer-zzts3d-las-hNa-nqxq.js +560 -0
  27. package/dist/zz-layer-zzts3d-point-DrB5Uuwa.js +750 -0
  28. package/dist/zz-layer-zzts3dtype-BRl3mCk9.js +493 -0
  29. package/dist/zz-layer-zzts3dv2-D5udnVGT.js +913 -0
  30. package/dist/zz-terrain-excavation-A2NXSQ5P.js +502 -0
  31. package/dist/zz-viewer/index.vue.d.ts +2 -2
  32. package/dist/zzts3dLayerSignature-Cnu6KIys.js +42 -0
  33. package/package.json +2 -2
@@ -0,0 +1,239 @@
1
+ import { computed as e, inject as t, onUnmounted as n, watch as r } from "vue";
2
+ import { httpService as i } from "@skzz/libs-base";
3
+ //#region src/zz-layer/zz-layer-zzts3d-grid/query.vue
4
+ var a = {
5
+ __name: "query",
6
+ props: {
7
+ config: {
8
+ type: Object,
9
+ default: () => ({})
10
+ },
11
+ style: {
12
+ type: Object,
13
+ default: () => ({})
14
+ }
15
+ },
16
+ emits: ["grid-change"],
17
+ setup(a, { emit: o }) {
18
+ let s = t("cesiumViewer"), c = o, l = a, u = {
19
+ dictCode: "",
20
+ polygon: "",
21
+ height: 0,
22
+ high: 0,
23
+ fill: {
24
+ color: "255,255,255",
25
+ opacity: 1,
26
+ show: !0
27
+ },
28
+ line: {
29
+ color: "0,0,225",
30
+ opacity: 1,
31
+ show: !0,
32
+ width: .5
33
+ }
34
+ }, d = e(() => {
35
+ let e = l.config || {}, t = l.style || {};
36
+ return {
37
+ ...u,
38
+ ...e,
39
+ fill: {
40
+ ...u.fill,
41
+ ...e.fill || {},
42
+ ...t.fill || {}
43
+ },
44
+ line: {
45
+ ...u.line,
46
+ ...e.line || {},
47
+ ...t.line || {}
48
+ }
49
+ };
50
+ }), f = e(() => {
51
+ let e = d.value;
52
+ return JSON.stringify({
53
+ dictCode: e.dictCode,
54
+ polygon: e.polygon,
55
+ height: e.height,
56
+ high: e.high
57
+ });
58
+ }), p = 0, m = "", h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Set(), v = null, y = null, b = null;
59
+ function x(e) {
60
+ if (!e) return {
61
+ r: 255,
62
+ g: 255,
63
+ b: 255
64
+ };
65
+ if (typeof e == "string" && e.startsWith("#") && e.length === 7) return {
66
+ r: Number.parseInt(e.slice(1, 3), 16),
67
+ g: Number.parseInt(e.slice(3, 5), 16),
68
+ b: Number.parseInt(e.slice(5, 7), 16)
69
+ };
70
+ let t = String(e).split(",").map((e) => Number.parseFloat(e.trim()));
71
+ return {
72
+ r: Number.isFinite(t[0]) ? t[0] : 255,
73
+ g: Number.isFinite(t[1]) ? t[1] : 255,
74
+ b: Number.isFinite(t[2]) ? t[2] : 255
75
+ };
76
+ }
77
+ function S(e, t = 1) {
78
+ let { r: n, g: r, b: i } = x(e), a = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 1;
79
+ return Cesium.Color.fromBytes(Math.max(0, Math.min(255, Math.round(n))), Math.max(0, Math.min(255, Math.round(r))), Math.max(0, Math.min(255, Math.round(i))), Math.round(a * 255));
80
+ }
81
+ function C(e) {
82
+ let t = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : Array.isArray(e?.records) ? e.records : [], n = [];
83
+ for (let e = 0; e < t.length; e++) {
84
+ let r = t[e];
85
+ if (!Array.isArray(r) || r.length < 1) continue;
86
+ let i = r[0];
87
+ if (!i || typeof i != "object") continue;
88
+ let a = i.xmin, o = i.ymin, s = i.xmax, c = i.ymax, l = i.height, u = i.highLength;
89
+ if (![
90
+ a,
91
+ o,
92
+ s,
93
+ c,
94
+ u,
95
+ l
96
+ ].every(Number.isFinite)) continue;
97
+ let d = i.geoSot || i.highCode || `grid_${e}`;
98
+ n.push([
99
+ a,
100
+ o,
101
+ s,
102
+ c,
103
+ u,
104
+ l,
105
+ d
106
+ ]);
107
+ }
108
+ return n;
109
+ }
110
+ function w(e) {
111
+ let t = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : Array.isArray(e?.records) ? e.records : [], n = [];
112
+ for (let e = 0; e < t.length; e++) {
113
+ let r = t[e];
114
+ if (!Array.isArray(r) || r.length < 1) continue;
115
+ let i = r[0];
116
+ !i || typeof i != "object" || n.push(i);
117
+ }
118
+ return n;
119
+ }
120
+ function T(e = []) {
121
+ c("grid-change", e);
122
+ }
123
+ function E() {
124
+ if (!s.value) return null;
125
+ if (v) return v;
126
+ let e = new Cesium.PrimitiveCollection();
127
+ return s.value.scene.primitives.add(e), v = e, v;
128
+ }
129
+ function D() {
130
+ if (v) {
131
+ try {
132
+ y && v.remove(y), b && v.remove(b);
133
+ } catch {}
134
+ y = null, b = null;
135
+ }
136
+ }
137
+ function O() {
138
+ try {
139
+ D(), s.value && v && s.value.scene.primitives.remove(v);
140
+ } catch {}
141
+ v = null;
142
+ }
143
+ function k(e) {
144
+ m && h.has(m) && A(h.get(m), e);
145
+ }
146
+ function A(e, t) {
147
+ console.log(e);
148
+ let n = E();
149
+ if (!n) return;
150
+ D();
151
+ let r = S(t.fill?.color, t.fill?.opacity), i = S(t.line?.color, t.line?.opacity), a = t.fill?.show !== !1, o = t.line?.show !== !1, s = [], c = [];
152
+ for (let t = 0; t < e.length; t++) {
153
+ let n = e[t], l = n[0], u = n[1], d = n[2], f = n[3], p = n[4], m = n[5], h = n[6], g = Cesium.Rectangle.fromDegrees(l, u, d, f), _ = m + p;
154
+ a && s.push(new Cesium.GeometryInstance({
155
+ id: `grid_fill_${h}`,
156
+ geometry: new Cesium.RectangleGeometry({
157
+ rectangle: g,
158
+ height: m,
159
+ extrudedHeight: _,
160
+ vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
161
+ }),
162
+ attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(r) }
163
+ })), o && c.push(new Cesium.GeometryInstance({
164
+ id: `grid_outline_${h}`,
165
+ geometry: new Cesium.RectangleOutlineGeometry({
166
+ rectangle: g,
167
+ height: m,
168
+ extrudedHeight: _
169
+ }),
170
+ attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(i) }
171
+ }));
172
+ }
173
+ s.length && (y = n.add(new Cesium.Primitive({
174
+ geometryInstances: s,
175
+ appearance: new Cesium.PerInstanceColorAppearance({
176
+ translucent: !0,
177
+ closed: !0
178
+ }),
179
+ asynchronous: !0
180
+ }))), c.length && (b = n.add(new Cesium.Primitive({
181
+ geometryInstances: c,
182
+ appearance: new Cesium.PerInstanceColorAppearance({
183
+ translucent: !0,
184
+ flat: !0
185
+ }),
186
+ asynchronous: !0
187
+ })));
188
+ }
189
+ async function j() {
190
+ if (!s.value) return;
191
+ let e = d.value || {}, t = f.value;
192
+ if (!e.dictCode || !e.polygon) {
193
+ O(), m = "", T([]);
194
+ return;
195
+ }
196
+ let n = ++p;
197
+ E(), D();
198
+ let r = h.get(t), a = g.get(t);
199
+ if (!r) {
200
+ let o = new AbortController();
201
+ _.add(o);
202
+ let s = await i.request({
203
+ method: "POST",
204
+ url: "/v1/zzts/twin/layer/3d/point/getGrid",
205
+ data: {
206
+ dictCode: e.dictCode,
207
+ polygon: e.polygon,
208
+ height: e.height,
209
+ high: e.high
210
+ },
211
+ signal: o.signal
212
+ }).catch((e) => {
213
+ if (o.signal.aborted) return null;
214
+ throw e;
215
+ });
216
+ if (_.delete(o), !s || n !== p) return;
217
+ let c = Array.isArray(s) ? s : s?.data ?? s;
218
+ r = C(c), a = w(c), r.length && h.set(t, r), g.set(t, a);
219
+ }
220
+ if (n === p) {
221
+ if (m = t, T(a || []), !r?.length) {
222
+ D();
223
+ return;
224
+ }
225
+ A(r, e);
226
+ }
227
+ }
228
+ return r(f, () => {
229
+ j();
230
+ }, { immediate: !0 }), r(() => [d.value.fill, d.value.line], () => {
231
+ let e = d.value || {};
232
+ !e.dictCode || !e.polygon || k(e);
233
+ }, { deep: !0 }), n(() => {
234
+ p++, _.forEach((e) => e.abort()), _.clear(), h.clear(), g.clear(), m = "", O();
235
+ }), (e, t) => null;
236
+ }
237
+ };
238
+ //#endregion
239
+ export { a as default };
@@ -0,0 +1,189 @@
1
+ import { computed as e, inject as t, onUnmounted as n, ref as r, watch as i } from "vue";
2
+ import { httpService as a } from "@skzz/libs-base";
3
+ //#region src/zz-layer/zz-layer-zzts3d-point/queryPoint.vue
4
+ var o = {
5
+ __name: "queryPoint",
6
+ props: {
7
+ config: {
8
+ type: Object,
9
+ default: () => ({})
10
+ },
11
+ style: {
12
+ type: Object,
13
+ default: () => ({})
14
+ }
15
+ },
16
+ emits: ["stats-change"],
17
+ setup(o, { emit: s }) {
18
+ let c = t("cesiumViewer"), l = s, u = r([]), d = o, f = {
19
+ dictCode: "",
20
+ polygon: "",
21
+ height: 0,
22
+ high: 0,
23
+ color: "255,0,0",
24
+ opacity: 1,
25
+ pixelSize: 5
26
+ }, p = e(() => {
27
+ let e = d.config || {}, t = d.style || {};
28
+ return {
29
+ ...f,
30
+ ...e,
31
+ color: t.color ?? e.color ?? f.color,
32
+ opacity: Number.isFinite(t.opacity) ? t.opacity : Number.isFinite(e.opacity) ? e.opacity : f.opacity,
33
+ pixelSize: Number.isFinite(t.pixelSize) ? t.pixelSize : Number.isFinite(e.pixelSize) ? e.pixelSize : f.pixelSize
34
+ };
35
+ }), m = e(() => {
36
+ let e = p.value;
37
+ return JSON.stringify({
38
+ dictCode: e.dictCode,
39
+ polygon: e.polygon,
40
+ height: e.height,
41
+ high: e.high
42
+ });
43
+ }), h = 0, g = "", _ = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), y = null;
44
+ function b(e) {
45
+ try {
46
+ let t = e?.["x-meta-data"] || e?.["X-Meta-Data"];
47
+ if (!t && e && typeof e.get == "function" && (t = e.get("x-meta-data") || e.get("X-Meta-Data")), !t) return [];
48
+ let n = decodeURIComponent(escape(atob(t))), r = JSON.parse(n), i = r?.avgValues, a = r?.properties || {};
49
+ return i ? Object.keys(i).map((e) => ({
50
+ twCode: e,
51
+ avgValue: i[e],
52
+ property: a[e] ?? ""
53
+ })) : [];
54
+ } catch (e) {
55
+ return console.warn("解析 X-Meta-Data 失败:", e), [];
56
+ }
57
+ }
58
+ function x(e) {
59
+ if (!e) return {
60
+ r: 255,
61
+ g: 0,
62
+ b: 0
63
+ };
64
+ if (typeof e == "string" && e.startsWith("#") && e.length === 7) return {
65
+ r: Number.parseInt(e.slice(1, 3), 16),
66
+ g: Number.parseInt(e.slice(3, 5), 16),
67
+ b: Number.parseInt(e.slice(5, 7), 16)
68
+ };
69
+ let t = String(e).split(",").map((e) => Number.parseFloat(e.trim()));
70
+ return {
71
+ r: Number.isFinite(t[0]) ? t[0] : 255,
72
+ g: Number.isFinite(t[1]) ? t[1] : 0,
73
+ b: Number.isFinite(t[2]) ? t[2] : 0
74
+ };
75
+ }
76
+ function S(e, t = 1) {
77
+ let { r: n, g: r, b: i } = x(e), a = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 1;
78
+ return Cesium.Color.fromBytes(Math.max(0, Math.min(255, Math.round(n))), Math.max(0, Math.min(255, Math.round(r))), Math.max(0, Math.min(255, Math.round(i))), Math.round(a * 255));
79
+ }
80
+ function C(e = []) {
81
+ u.value = e, l("stats-change", e);
82
+ }
83
+ function w(e) {
84
+ let t = [], n = e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength), r = new DataView(n), i = 0, a = r.getInt32(i, !0);
85
+ i += 4;
86
+ for (let e = 0; e < a; e++) {
87
+ let e = r.getBigInt64(i, !0);
88
+ i += 8;
89
+ let n = r.getInt32(i, !0);
90
+ i += 4;
91
+ let a = n / 8, o = new Float64Array(a);
92
+ for (let e = 0; e < a; e++) o[e] = r.getFloat64(i, !0), i += 8;
93
+ t.push({
94
+ positions: o,
95
+ positionCount: a,
96
+ modelId: e.toString(),
97
+ lodLevel: 0
98
+ });
99
+ }
100
+ return t;
101
+ }
102
+ function T() {
103
+ if (!(!c.value || !y)) {
104
+ try {
105
+ c.value.scene.primitives.remove(y);
106
+ } catch {}
107
+ y = null;
108
+ }
109
+ }
110
+ function E(e, t) {
111
+ if (!e?.length || !c.value) {
112
+ T();
113
+ return;
114
+ }
115
+ T(), y = new Cesium.PointPrimitiveCollection({ blendOption: Cesium.BlendingState.BLEND_ADDITIVE });
116
+ let n = S(t.color, t.opacity), r = t.pixelSize;
117
+ e.forEach((e) => {
118
+ if (!e.positions?.length) return;
119
+ let t = e.positions;
120
+ for (let i = 0; i < t.length; i += 3) {
121
+ let a = t[i], o = t[i + 1], s = t[i + 2], c = y.add({
122
+ position: Cesium.Cartesian3.fromDegrees(a, o, s),
123
+ color: n,
124
+ pixelSize: r
125
+ });
126
+ c.geomModelId = e.modelId;
127
+ }
128
+ }), c.value.scene.primitives.add(y);
129
+ }
130
+ async function D() {
131
+ if (!c.value) return;
132
+ let e = p.value || {}, t = m.value;
133
+ if (!e.dictCode || !e.polygon) {
134
+ T(), C([]), g = "";
135
+ return;
136
+ }
137
+ let n = ++h, r = _.get(t);
138
+ if (r) C(v.get(t) || []);
139
+ else {
140
+ let i = new FormData();
141
+ i.append("modelsJson", JSON.stringify([{
142
+ dictCode: e.dictCode,
143
+ polygon: e.polygon,
144
+ height: e.height,
145
+ high: e.high
146
+ }]));
147
+ let o = await a.request({
148
+ method: "POST",
149
+ url: "/v1/zzts/twin/layer/3d/point/mining",
150
+ timeout: 6e4,
151
+ responseType: "arraybuffer",
152
+ headers: { "Content-Type": "multipart/form-data" },
153
+ data: i
154
+ });
155
+ if (n !== h) return;
156
+ r = w(new Uint8Array(o.data));
157
+ let s = b(o.headers);
158
+ _.set(t, r), v.set(t, s), C(s);
159
+ }
160
+ if (n === h) {
161
+ if (g = t, !r?.length) {
162
+ T();
163
+ return;
164
+ }
165
+ E(r, e);
166
+ }
167
+ }
168
+ function O() {
169
+ !g || !_.has(g) || E(_.get(g), p.value);
170
+ }
171
+ return i(m, () => {
172
+ D();
173
+ }, { immediate: !0 }), i(() => [
174
+ d.style?.color,
175
+ d.style?.opacity,
176
+ d.style?.pixelSize,
177
+ d.config?.color,
178
+ d.config?.opacity,
179
+ d.config?.pixelSize
180
+ ], () => {
181
+ let e = p.value || {};
182
+ !e.dictCode || !e.polygon || O();
183
+ }, { deep: !0 }), n(() => {
184
+ T(), C([]);
185
+ }), (e, t) => null;
186
+ }
187
+ };
188
+ //#endregion
189
+ export { o as default };
@@ -0,0 +1,75 @@
1
+ import { a as e, r as t } from "./layerStack-CbiVJONn.js";
2
+ import { computed as n, inject as r, onMounted as i, onUnmounted as a, watch as o } from "vue";
3
+ import * as s from "cesium";
4
+ //#region src/zz-model/zz-3dtiles/index.vue
5
+ var c = {
6
+ __name: "index",
7
+ props: {
8
+ config: {
9
+ type: Object,
10
+ default: () => ({})
11
+ },
12
+ stackIndex: {
13
+ type: Number,
14
+ default: -1
15
+ },
16
+ subStackIndex: {
17
+ type: Number,
18
+ default: 0
19
+ },
20
+ groupKey: {
21
+ type: String,
22
+ default: ""
23
+ }
24
+ },
25
+ emits: ["load-error"],
26
+ setup(c, { emit: l }) {
27
+ let u = r("cesiumViewer"), d = l, f = c, p, m = {
28
+ autoFitToView: !0,
29
+ show: !0
30
+ }, h = n(() => ({
31
+ ...m,
32
+ ...f.config
33
+ })), g = async () => {
34
+ if (u.value) {
35
+ _();
36
+ try {
37
+ if (p = await s.Cesium3DTileset.fromUrl(h.value.url), p.show = h.value.show !== !1, typeof h.value.maximumScreenSpaceError == "number" && (p.maximumScreenSpaceError = h.value.maximumScreenSpaceError), t(u.value, p, f.stackIndex, 0, {
38
+ layerType: "tiles3d",
39
+ groupKey: f.groupKey || h.value.url || String(f.stackIndex),
40
+ subStackIndex: f.subStackIndex
41
+ }), h.value.autoFitToView) {
42
+ let e = h.value.fitDuration;
43
+ typeof e == "number" ? u.value.flyTo(p, { duration: e }) : u.value.zoomTo(p);
44
+ }
45
+ h.value.customShader && (p.customShader = customShader);
46
+ } catch (e) {
47
+ console.error("3D Tiles 图层加载失败:", e), d("load-error");
48
+ }
49
+ }
50
+ }, _ = () => {
51
+ u.value && (p &&= (u.value.scene.primitives.remove(p), null));
52
+ };
53
+ return o(h, (e, t) => {
54
+ e.url === t?.url ? p && e.show !== t?.show && (p.show = e.show !== !1) : g();
55
+ }, { deep: !0 }), o(() => [
56
+ f.stackIndex,
57
+ f.subStackIndex,
58
+ f.groupKey
59
+ ], () => {
60
+ p && u.value && f.stackIndex >= 0 && e(u.value, p, f.stackIndex, {
61
+ layerType: "tiles3d",
62
+ groupKey: f.groupKey || h.value.url || String(f.stackIndex),
63
+ subStackIndex: f.subStackIndex
64
+ });
65
+ }), o(u, (e) => {
66
+ e && g();
67
+ }), i(() => {
68
+ g();
69
+ }), a(() => {
70
+ _();
71
+ }), (e, t) => null;
72
+ }
73
+ };
74
+ //#endregion
75
+ export { c as default };
@@ -0,0 +1,70 @@
1
+ import { computed as e, inject as t, onMounted as n, onUnmounted as r, ref as i, watch as a } from "vue";
2
+ import * as o from "cesium";
3
+ //#region src/zz-model/zz-gltf/index.vue
4
+ var s = {
5
+ __name: "index",
6
+ props: { config: {
7
+ type: Object,
8
+ default: () => ({})
9
+ } },
10
+ emits: ["model-ready", "model-error"],
11
+ setup(s, { emit: c }) {
12
+ let l = t("cesiumViewer"), u = c, d = s, f = i(null), p = {
13
+ url: "",
14
+ position: {
15
+ lng: 0,
16
+ lat: 0,
17
+ height: 0
18
+ },
19
+ scale: 1,
20
+ rotation: {
21
+ heading: 0,
22
+ pitch: 0,
23
+ roll: 0
24
+ },
25
+ show: !0,
26
+ minimumPixelSize: 128,
27
+ maximumScale: 2e4,
28
+ name: "gltf-model",
29
+ credit: ""
30
+ }, m = e(() => ({
31
+ ...p,
32
+ ...d.config
33
+ })), h = () => {
34
+ f.value && l.value && (l.value.entities.remove(f.value), f.value = null);
35
+ }, g = () => {
36
+ if (!(!l.value || !m.value.url)) {
37
+ h();
38
+ try {
39
+ let e = o.Cartesian3.fromDegrees(m.value.position.lng, m.value.position.lat, m.value.position.height), t = o.Transforms.headingPitchRollQuaternion(e, new o.HeadingPitchRoll(m.value.rotation.heading, m.value.rotation.pitch, m.value.rotation.roll));
40
+ f.value = l.value.entities.add({
41
+ name: m.value.name,
42
+ position: e,
43
+ orientation: t,
44
+ show: m.value.show,
45
+ model: {
46
+ uri: m.value.url,
47
+ scale: m.value.scale,
48
+ minimumPixelSize: m.value.minimumPixelSize,
49
+ maximumScale: m.value.maximumScale,
50
+ credit: m.value.credit
51
+ }
52
+ }), l.value.flyTo(f.value), u("model-ready", f.value);
53
+ } catch (e) {
54
+ console.error("GLTF模型加载失败:", e), u("model-error", e);
55
+ }
56
+ }
57
+ };
58
+ return a(m, (e, t) => {
59
+ (e.url !== t.url || JSON.stringify(e.position) !== JSON.stringify(t.position) || e.scale !== t.scale || JSON.stringify(e.rotation) !== JSON.stringify(t.rotation) || e.show !== t.show) && g();
60
+ }, { deep: !0 }), a(l, (e) => {
61
+ e && g();
62
+ }), n(() => {
63
+ g();
64
+ }), r(() => {
65
+ h();
66
+ }), (e, t) => null;
67
+ }
68
+ };
69
+ //#endregion
70
+ export { s as default };
@@ -0,0 +1,53 @@
1
+ export function shpZztsDbName(layerId: any): string;
2
+ export function tileMemoryKey(level: any, geosot: any): string;
3
+ export function tileIdbKey(level: any, geosot: any): string;
4
+ export function bulkIdbKey(level: any): string;
5
+ export function buildTileSetKey(lodLevel: any, tiles: any): string;
6
+ /**
7
+ * 同 LOD 且瓦片集合未变、场景上已有该层图元时,跳过拆建。
8
+ * 图例显隐走独立双缓冲,不经过这条判定。
9
+ */
10
+ export function shouldSkipShpZztsRebuild({ tileSetKey, lastTileSetKey, currentLod, lodLevel, hasPrimitives, }?: {}): boolean;
11
+ export function touchLru(map: any, key: any): any;
12
+ export function rememberLru(map: any, key: any, value: any, max: any): any;
13
+ export function isRenderableTileBuffer(data: any): boolean;
14
+ /** 中止或非 ArrayBuffer 不当成空瓦持久化,避免瞬时失败把格子写成永久空白 */
15
+ export function shouldPersistTileBuffer(data: any, aborted?: boolean): boolean;
16
+ /**
17
+ * 视窗绘制策略:切 LOD 有未缓存瓦片时也先留旧层拉齐,不再渐进拆旧。
18
+ * skip | lod-keep-old | double-buffer | silod
19
+ */
20
+ export function shpZztsViewPaintMode({ tileSetKey, lastTileSetKey, currentLod, lodLevel, hasPrimitives, pendingCount, }?: {
21
+ pendingCount?: number | undefined;
22
+ }): "skip" | "lod-keep-old" | "double-buffer" | "silod";
23
+ export function collectFeatureIds(geoms?: any[]): string[];
24
+ /**
25
+ * 首屏累计几何换挂:绘制进行中只保留最新快照,避免每块瓦片都重建。
26
+ */
27
+ export function createFirstPaintCoalescer(paintSnapshot: any): {
28
+ schedule: (snapshot: any) => void;
29
+ whenIdle: () => Promise<any>;
30
+ };
31
+ /**
32
+ * 跨瓦合并配色请求:并发瓦片先入队;凑满 800 立即 POST,否则短窗口合并。
33
+ * 未命中的 id 写入 cache=null,避免空结果反复打网。fetchAll 失败时作回退。
34
+ */
35
+ export function createModelColorDrain({ cache, postBatch, batchSize, coalesceMs, postConcurrency, delay, }?: {
36
+ batchSize?: number | undefined;
37
+ coalesceMs?: number | undefined;
38
+ postConcurrency?: number | undefined;
39
+ delay?: ((ms: any) => Promise<any>) | undefined;
40
+ }): {
41
+ ensure: (ids?: any[]) => Promise<void>;
42
+ reset: () => void;
43
+ };
44
+ /**
45
+ * 矢量 ZZTS 缓存键与跳过重建判定(无 Cesium / 无 IO,便于 Node 自测)。
46
+ */
47
+ export const SHP_ZZTS_IDB_VERSION: 6;
48
+ export const SHP_ZZTS_IDB_STORE: "vectorTile";
49
+ export const SHP_ZZTS_FETCH_CONCURRENCY: 12;
50
+ export const SHP_ZZTS_FIRST_PAINT_BATCH: 400;
51
+ export const SHP_ZZTS_COLOR_BATCH: 800;
52
+ export const SHP_ZZTS_COLOR_COALESCE_MS: 48;
53
+ export const SHP_ZZTS_COLOR_POST_CONCURRENCY: 2;