cesium_dev_kit 1.1.22 → 1.1.24

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 (107) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +299 -291
  3. package/README.zh-CN.md +279 -0
  4. package/SECURITY.md +21 -0
  5. package/dist/Analysis-BLpVrGfg.d.mts +143 -0
  6. package/dist/Analysis-DmO1gtgS.d.ts +143 -0
  7. package/dist/Base-DH8H9suE.d.mts +635 -0
  8. package/dist/Base-DH8H9suE.d.ts +635 -0
  9. package/dist/Base-_BOXyMdS.d.ts +43 -0
  10. package/dist/Base-skqjcPfo.d.mts +43 -0
  11. package/dist/Control-B7AMFmHe.d.ts +98 -0
  12. package/dist/Control-BrpRU7RP.d.mts +98 -0
  13. package/dist/CustomCesiumPlugin-BqgAvlhi.d.ts +29 -0
  14. package/dist/CustomCesiumPlugin-CKYQ-7i9.d.mts +29 -0
  15. package/dist/Draw-1NhPP8z3.d.mts +490 -0
  16. package/dist/Draw-DRh7yNzc.d.ts +490 -0
  17. package/dist/Graphics-CuFNsQ3b.d.ts +1565 -0
  18. package/dist/Graphics-QE3Gb43w.d.mts +1565 -0
  19. package/dist/Material-CeZ4l-tY.d.mts +165 -0
  20. package/dist/Material-Cqbyf2Pn.d.ts +165 -0
  21. package/dist/Math3d-0nO-vFbT.d.mts +179 -0
  22. package/dist/Math3d-t635PYzU.d.ts +179 -0
  23. package/dist/PassEffect-DEFyytQZ.d.ts +41 -0
  24. package/dist/PassEffect-DEgElnVk.d.mts +41 -0
  25. package/dist/Plugin-BPCX0zTu.d.mts +197 -0
  26. package/dist/Plugin-DnYT0bue.d.ts +197 -0
  27. package/dist/Primitive-BNXp-9_6.d.mts +199 -0
  28. package/dist/Primitive-UEAuUimH.d.ts +199 -0
  29. package/dist/ThreeJs-BAlEWxa1.d.mts +44 -0
  30. package/dist/ThreeJs-DpAcw_qf.d.ts +44 -0
  31. package/dist/analysis.cjs +145 -0
  32. package/dist/analysis.cjs.map +1 -0
  33. package/dist/analysis.d.mts +6 -0
  34. package/dist/analysis.d.ts +6 -0
  35. package/dist/analysis.mjs +145 -0
  36. package/dist/analysis.mjs.map +1 -0
  37. package/dist/control.cjs +140 -0
  38. package/dist/control.cjs.map +1 -0
  39. package/dist/control.d.mts +4 -0
  40. package/dist/control.d.ts +4 -0
  41. package/dist/control.mjs +140 -0
  42. package/dist/control.mjs.map +1 -0
  43. package/dist/custom-cesium-plugin.cjs +507 -0
  44. package/dist/custom-cesium-plugin.cjs.map +1 -0
  45. package/dist/custom-cesium-plugin.d.mts +4 -0
  46. package/dist/custom-cesium-plugin.d.ts +4 -0
  47. package/dist/custom-cesium-plugin.mjs +507 -0
  48. package/dist/custom-cesium-plugin.mjs.map +1 -0
  49. package/dist/default-static.cjs +3 -0
  50. package/dist/default-static.cjs.map +1 -0
  51. package/dist/default-static.d.mts +37 -0
  52. package/dist/default-static.d.ts +37 -0
  53. package/dist/default-static.mjs +3 -0
  54. package/dist/default-static.mjs.map +1 -0
  55. package/dist/draw.cjs +140 -0
  56. package/dist/draw.cjs.map +1 -0
  57. package/dist/draw.d.mts +6 -0
  58. package/dist/draw.d.ts +6 -0
  59. package/dist/draw.mjs +140 -0
  60. package/dist/draw.mjs.map +1 -0
  61. package/dist/graphics.cjs +140 -0
  62. package/dist/graphics.cjs.map +1 -0
  63. package/dist/graphics.d.mts +19 -0
  64. package/dist/graphics.d.ts +19 -0
  65. package/dist/graphics.mjs +140 -0
  66. package/dist/graphics.mjs.map +1 -0
  67. package/dist/index.cjs +1112 -0
  68. package/dist/index.cjs.map +1 -0
  69. package/dist/index.d.mts +674 -0
  70. package/dist/index.d.ts +674 -0
  71. package/dist/index.mjs +1112 -0
  72. package/dist/index.mjs.map +1 -0
  73. package/dist/material.cjs +391 -0
  74. package/dist/material.cjs.map +1 -0
  75. package/dist/material.d.mts +4 -0
  76. package/dist/material.d.ts +4 -0
  77. package/dist/material.mjs +391 -0
  78. package/dist/material.mjs.map +1 -0
  79. package/dist/pass-effect.cjs +416 -0
  80. package/dist/pass-effect.cjs.map +1 -0
  81. package/dist/pass-effect.d.mts +4 -0
  82. package/dist/pass-effect.d.ts +4 -0
  83. package/dist/pass-effect.mjs +416 -0
  84. package/dist/pass-effect.mjs.map +1 -0
  85. package/dist/plugin.cjs +141 -0
  86. package/dist/plugin.cjs.map +1 -0
  87. package/dist/plugin.d.mts +4 -0
  88. package/dist/plugin.d.ts +4 -0
  89. package/dist/plugin.mjs +141 -0
  90. package/dist/plugin.mjs.map +1 -0
  91. package/dist/primitive.cjs +370 -0
  92. package/dist/primitive.cjs.map +1 -0
  93. package/dist/primitive.d.mts +4 -0
  94. package/dist/primitive.d.ts +4 -0
  95. package/dist/primitive.mjs +370 -0
  96. package/dist/primitive.mjs.map +1 -0
  97. package/dist/three.cjs +140 -0
  98. package/dist/three.cjs.map +1 -0
  99. package/dist/three.d.mts +4 -0
  100. package/dist/three.d.ts +4 -0
  101. package/dist/three.mjs +140 -0
  102. package/dist/three.mjs.map +1 -0
  103. package/package.json +290 -46
  104. package/dist/index.js +0 -1
  105. package/dist/index.min.js +0 -1
  106. package/dist/index.umd.js +0 -1
  107. package/index.js +0 -37
@@ -0,0 +1,279 @@
1
+ ## cesium_dev_kit
2
+
3
+ [![Build Status][build-main]][build-status]
4
+ [![NPM Package][npm]][npm-url]
5
+ [![NPM DownloadsWeekly][npm-download]][npmtrends-url]
6
+ [![Build Size][build-size]][build-size-url]
7
+ [![GitHub Repo stars][repo-stars]][star-chart]
8
+ [![license][license-uri]][license-link]
9
+
10
+ [English](./README.md) | **中文**
11
+
12
+ ## 简介
13
+
14
+ 这是一个 Cesium 开发工具包,包含图层加载、坐标转换、坐标拾取、相机控制、测量、标绘、模型加载、模型平移旋转缩放、模型/3Dtiles 视角位置调整、模型拖拽、天气(雨,雪,雾)场景、雷达扫描、信息框、流动线、发光线、动态墙等各种发光材质、后置场景效果、通视分析、透视分析、坡度分析、淹没分析、方量分析、地形开挖等各种分析案例。
15
+
16
+ ## API 文档与在线 Demo
17
+
18
+ - API 文档:[:bookmark_tabs: https://dengxiaoning.github.io/cesium_dev_kit/](https://dengxiaoning.github.io/cesium_dev_kit/)
19
+ - 在线 Demo:[:rocket: https://dengxiaoning.github.io/cesium_dev_kit/demo/?auto=1](https://dengxiaoning.github.io/cesium_dev_kit/demo/?auto=1)
20
+
21
+ 两者同属一个 GitHub Pages 站点:文档在根路径,Demo 在 `/demo/`。Demo 用模拟账号自动登录
22
+ (`?auto=1`),左侧菜单就是全部示例,和文档里的类一一对应。
23
+
24
+ 文档由 `src/utils/cesiumPluginsExtends` 下的 JSDoc 注释生成(TypeDoc):
25
+
26
+ ```bash
27
+ npm run docs # 生成 API 文档到 docs/
28
+ npm run build:demo:pages # 把 Demo 构建到 docs/demo/
29
+ npm run docs:serve # 本地预览 http://localhost:5174
30
+ ```
31
+
32
+ 推送到 `main` 后由 `.github/workflows/docs.yml` 依次构建文档与 Demo,并发布到 GitHub Pages。
33
+
34
+ ## 功能展示
35
+
36
+ | ![material](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/material.gif) | ![analysis](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/analysis.gif) | ![plot](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/plot.gif) |
37
+ | :---------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: |
38
+ | 材质 | 分析 | 标绘 |
39
+ | ![dnyRiver](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/dnyRiver.gif) | ![extrude](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/extrude.gif) | ![effect](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/effect.gif) |
40
+ | 河流 | 图形挤压 | 特效 |
41
+ | ![radar](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/radar.gif) | ![roaming](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathRoam.gif) | ![drag](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/drag.gif) |
42
+ | 雷达案例 | 第一人称漫游 | 拖拽 |
43
+ | ![rayCast](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/rayCast.gif) | ![fireworksEffect](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/fireworksEffect.gif) | ![aniSoldier](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/aniSoldier.gif) |
44
+ | 光线投射 | 烟花效果 | 奔跑的士兵 |
45
+ | ![路线规划](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathPlan.gif) | ![自定义图元](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/custPrimitive.gif) | ![聚合图层](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/clusterLayer.gif) |
46
+ | 路线规划 | 自定义图元 | 聚合图层 |
47
+ | ![三维柱状](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/bar3d.gif) | ![卷帘](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/rollerBlind.gif) | ![heatmap3d](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/heatmap3d.gif) |
48
+ | 三维柱状 | 卷帘 | 三维热力 |
49
+
50
+ [更多>>](https://dengxiaoning.github.io/cesium_dev_kit/demo/?auto=1)
51
+
52
+ ## 安装
53
+
54
+ ```shell
55
+ npm install cesium_dev_kit cesium
56
+ # 可选:仅 Three.js 集成需要
57
+ npm install three
58
+ ```
59
+
60
+ > 需要 Cesium `>=1.105`,`three`、`echarts`、`dat.gui`、`libgif` 均为可选 peer 依赖(仅在使用对应功能时安装)。
61
+ > 库内不再内置 Cesium Ion token,请通过 `extraConfig.AccessToken` 传入,或在应用入口设置 `Cesium.Ion.defaultAccessToken`。
62
+
63
+ ## 快速开始(推荐按需引入)
64
+
65
+ ```ts
66
+ import * as Cesium from 'cesium'
67
+ import { Graphics } from 'cesium_dev_kit/graphics'
68
+
69
+ // 使用自己的 token,例如从环境变量读取
70
+ Cesium.Ion.defaultAccessToken = import.meta.env.VITE_CESIUM_ION_TOKEN
71
+
72
+ const { viewer, graphics, dispose } = Graphics({
73
+ cesiumGlobal: Cesium,
74
+ containerId: 'cesiumContainer'
75
+ })
76
+
77
+ // 页面 / 路由卸载时释放 kit 自己创建的 viewer
78
+ dispose()
79
+ ```
80
+
81
+ `cesium_dev_kit/graphics` 不会连带引入 `echarts` / `dat.gui`。可用子路径:
82
+ `/graphics`、`/material`、`/primitive`、`/draw`、`/analysis`、`/plugin`、
83
+ `/pass-effect`、`/control`、`/three`、`/custom-cesium-plugin`、`/default-static`。
84
+
85
+ ### 默认图片与静态资源
86
+
87
+ 天空盒、点图标、光锥、水面、分析贴图等功能会用到一组默认图片。不传
88
+ `defaultStatic` 时,库会使用内置 CDN 配置,保证新项目安装后不会出现 404:
89
+
90
+ ```ts
91
+ import { defaultStatic, createDefaultStatic } from 'cesium_dev_kit/default-static'
92
+
93
+ // 1. 使用内置 CDN(默认)
94
+ // 2. 换成自己的 CDN
95
+ const myStatic = createDefaultStatic('https://cdn.example.com/')
96
+ // 3. 使用相对路径,并把本仓库的 ./public/static 自托管到你的站点
97
+ const localStatic = createDefaultStatic('')
98
+ ```
99
+
100
+ 完整引入:
101
+
102
+ ```ts
103
+ import { initCesium } from 'cesium_dev_kit'
104
+
105
+ const kit = initCesium({
106
+ cesiumGlobal: Cesium,
107
+ containerId: 'cesiumContainer',
108
+ extraConfig: { AccessToken: 'YOUR_CESIUM_ION_TOKEN' }
109
+ })
110
+
111
+ // ...
112
+ kit.dispose()
113
+ ```
114
+
115
+ ### 推荐入口:createKit
116
+
117
+ `createKit` 与 `initCesium` 参数一致,但返回显式上下文,`dispose()` 的边界也更清楚:
118
+
119
+ ```ts
120
+ import * as Cesium from 'cesium'
121
+ import { createKit } from 'cesium_dev_kit'
122
+
123
+ const kit = createKit({
124
+ Cesium, // 也可以写 cesiumGlobal
125
+ containerId: 'cesiumContainer',
126
+ assetsBaseUrl: '/static/', // 等价于 createDefaultStatic('/static/')
127
+ extraConfig: { AccessToken: import.meta.env.VITE_CESIUM_ION_TOKEN },
128
+ onError: (err, ctx) => console.warn(ctx?.scope, err) // 接管非致命错误
129
+ })
130
+
131
+ kit.context.viewer // 与 kit.viewer 相同
132
+ kit.graphics.createDynamicCircleGraphics({ /* ... */ })
133
+ kit.dispose() // 幂等;kit.isDisposed() 可查询状态
134
+ ```
135
+
136
+ 约定:
137
+
138
+ - viewer 由 kit 创建时,`dispose()` 会 `viewer.destroy()`;
139
+ - viewer 由调用方传入时,`dispose()` 只清理 kit 自己添加的 DataSource / 监听,不销毁 viewer;
140
+ - 同一页面可以创建多个 kit:模块内部不再共享模块级 `Cesium` / `dfSt` 状态;
141
+ - 旧写法 `new initCesium({...})` 仍然可用,但已标记为兼容入口,新代码建议用 `createKit`。
142
+
143
+ ### 错误处理
144
+
145
+ 库内主动抛出的错误统一为 `CesiumDevKitError`,带稳定的 `code`:
146
+
147
+ ```ts
148
+ import { isCesiumDevKitError, setErrorHandler } from 'cesium_dev_kit'
149
+
150
+ try {
151
+ const kit = createKit({ Cesium, containerId: 'cesiumContainer' })
152
+ } catch (err) {
153
+ if (isCesiumDevKitError(err) && err.code === 'MISSING_VIEWER') {
154
+ // 自己补一个容器
155
+ }
156
+ }
157
+
158
+ // 库内被 catch 掉的非致命错误(销毁失败、可选依赖缺失等)默认 console.warn
159
+ setErrorHandler((err, ctx) => console.warn(ctx?.scope, err))
160
+ ```
161
+
162
+ 错误码:`MISSING_CESIUM`、`MISSING_VIEWER`、`INVALID_ARGUMENT`、`IMAGERY_FAILED`、
163
+ `OPTIONAL_DEPENDENCY_MISSING`、`UNSUPPORTED_ENVIRONMENT`、`UNSUPPORTED_CESIUM_VERSION`、`INTERNAL`。
164
+
165
+ > 命名修正:`craete*` 系列方法已提供正式名 `create*`(如 `craeteDynamicCricleGraphics` →
166
+ > `createDynamicCircleGraphics`),旧名保留并标记 `@deprecated`。
167
+
168
+
169
+ ### 如需在 H5 中使用
170
+
171
+ - html 中直接引入 index.umd.js
172
+
173
+ ```javaScript
174
+ <script type="text/javascript" src="index.umd.js"></script>
175
+ ```
176
+
177
+ - 初始化对象
178
+
179
+ ```javaScript
180
+ new cesium_dev_kit.initCesium({...})
181
+ ```
182
+
183
+ ## 部署
184
+
185
+ ```shell
186
+ npm install
187
+ npm run dev # 查看案例
188
+ npm run typecheck
189
+ npm test
190
+ npm run build:lib # 将插件打包,其中包含 ESM + CJS + .d.ts + 源码
191
+ npm run build # 查看案例
192
+ ```
193
+
194
+ ---
195
+
196
+ ## 使用范例
197
+
198
+ - ES6 使用案例
199
+ [https://github.com/dengxiaoning/cesium_kit_test](https://github.com/dengxiaoning/cesium_kit_test)
200
+
201
+ - React Use case
202
+ [https://github.com/dengxiaoning/react-cesium](https://github.com/dengxiaoning/react-cesium)
203
+ - H5 使用案例
204
+ [https://github.com/dengxiaoning/cesium_kit_test_h5](https://github.com/dengxiaoning/cesium_kit_test_h5)
205
+
206
+ ## 捐赠
207
+
208
+ 你是否使用并喜欢 cesium_dev_kit,但你没有找到一种方式来表达你的喜欢? 如果是,请考虑捐款来支持这个项目。或许不是也不用担心,不管有没有支持,我都会继续维护这个项目。不过,如果你请我喝杯咖啡,我会非常高兴 😄
209
+
210
+ - [![Support via PayPal](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/paypal-logo-129x32.svg)](https://paypal.me/xiaoningdeng?country.x=C2&locale.x=en_US)
211
+
212
+ - 微信 / 支付宝
213
+ <div style="display: flex">
214
+ <img alt="wechat" title="wechat" src="https://benpaodehenji.com/cesium_dev_kit/static/data/images/wechat.png">
215
+ <img alt="alipay" title="alipay" src="https://benpaodehenji.com/cesium_dev_kit/static/data/images/alipay.png">
216
+ </div>
217
+
218
+ ##
219
+
220
+ ## 浏览器支持
221
+
222
+ 本地开发推荐使用`Chrome 80+` 浏览器
223
+
224
+ 支持现代(chrome,Firefox,Microsoft edge,etc.)浏览器, 不支持 IE
225
+
226
+ ## 鸣谢
227
+
228
+ [cesium-d3kit](https://github.com/zhangti0708/cesium-d3kit)<br/>
229
+ [drawarrowforcesium](https://gitcode.net/mirrors/gitgitczl/drawarrowforcesium)<br/>
230
+ [vue3-ts-cesium-map-show](https://gitee.com/hawk86104/vue3-ts-cesium-map-show)<br/>
231
+
232
+ 本项目包括但不限于借鉴和参考以上资料,非常感谢作者分享
233
+
234
+ ## 项目不足与优化
235
+
236
+ - 1、Cesium 相关类型暂以宽松(`any`)为主,以兼容通过 CDN / 全局 `window.Cesium` 引入的方式;若使用 npm 安装的 cesium,可自行扩展精确类型
237
+ - 2、未作异常捕捉和处理
238
+ - 3、缺少单元测试与自动化发布流程
239
+
240
+ ## 如何贡献
241
+
242
+ <a href="https://github.com/dengxiaoning/cesium_dev_kit/graphs/contributors">
243
+ <img src="https://contrib.rocks/image?repo=dengxiaoning/cesium_dev_kit" />
244
+ </a>
245
+
246
+ 你可以[提一个 issue](https://github.com/dengxiaoning/cesium_dev_kit/issues/new) 或者提交一个 Pull Request。
247
+
248
+ 更多贡献详情见[CONTRIBUTING](./CONTRIBUTING.md)...
249
+
250
+ ---
251
+
252
+ ## `Star`
253
+
254
+ 非常感谢留下星星的好心人,感谢您的支持 :heart:
255
+
256
+ [![Stargazers repo roster for @dengxiaoning/cesium_dev_kit][stargazers-url]][stargazers-link]
257
+
258
+ ## `Fork`
259
+
260
+ @sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` :heart:
261
+
262
+ [![Forkers repo roster for @dengxiaoning/cesium_dev_kit][forkers-url]][forkers-link]
263
+
264
+ [npm]: https://img.shields.io/npm/v/cesium_dev_kit
265
+ [npm-url]: https://www.npmjs.com/package/cesium_dev_kit
266
+ [build-size]: https://img.shields.io/bundlephobia/minzip/cesium_dev_kit/1.0.70?logo=travis
267
+ [build-size-url]: https://img.shields.io/bundlephobia/minzip/cesium_dev_kit
268
+ [npm-download]: https://img.shields.io/npm/dy/cesium_dev_kit?logo=npm
269
+ [npmtrends-url]: https://www.npmtrends.com/cesium_dev_kit
270
+ [license-uri]: https://img.shields.io/npm/l/cesium_dev_kit.svg
271
+ [license-link]: https://npm.im/cesium_dev_kit
272
+ [build-status]: https://github.com/dengxiaoning/cesium_dev_kit
273
+ [build-main]: https://img.shields.io/github/actions/workflow/status/dengxiaoning/cesium_dev_kit/project-build.yml?branch=main&logo=github
274
+ [repo-stars]: https://img.shields.io/github/stars/dengxiaoning/cesium_dev_kit?style=plastic&logo=github
275
+ [forkers-url]: https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
276
+ [forkers-link]: https://github.com/dengxiaoning/cesium_dev_kit/network/members
277
+ [stargazers-url]: https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
278
+ [stargazers-link]: https://github.com/dengxiaoning/cesium_dev_kit/stargazers
279
+ [star-chart]: https://api.star-history.com/svg?repos=dengxiaoning/cesium_dev_kit&type=Date
package/SECURITY.md ADDED
@@ -0,0 +1,21 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Use this section to tell people about which versions of your project are
6
+ currently being supported with security updates.
7
+
8
+ | Version | Supported |
9
+ | ------- | ------------------ |
10
+ | 5.1.x | :white_check_mark: |
11
+ | 5.0.x | :x: |
12
+ | 4.0.x | :white_check_mark: |
13
+ | < 4.0 | :x: |
14
+
15
+ ## Reporting a Vulnerability
16
+
17
+ Use this section to tell people how to report a vulnerability.
18
+
19
+ Tell them where to go, how often they can expect to get an update on a
20
+ reported vulnerability, what to expect if the vulnerability is accepted or
21
+ declined, etc.
@@ -0,0 +1,143 @@
1
+ import { S as SingleImportConstructor } from './Base-skqjcPfo.mjs';
2
+ import { a as BindHandleEventOptions, V as Viewer, B as BaseInstance } from './Base-DH8H9suE.mjs';
3
+ import { M as Math3dInstance } from './Math3d-0nO-vFbT.mjs';
4
+ import { G as GraphicsInstance } from './Graphics-QE3Gb43w.mjs';
5
+
6
+ /** 模块内部持有的 cesium 全局对象 */
7
+ /** 画笔类方法的通用参数(Analysis 中调用的 draw* 方法) */
8
+ interface DrawMethodOptions {
9
+ type?: string;
10
+ clampToGround?: boolean;
11
+ height?: number;
12
+ style?: Record<string, unknown>;
13
+ callback?: (...args: any[]) => void;
14
+ [key: string]: unknown;
15
+ }
16
+ /** 通视/环视/坡度/方量等分析实例(含 remove 方法) */
17
+ interface AnalysisResultInstance {
18
+ remove(): void;
19
+ }
20
+ /** 创建通视分析参数 */
21
+ interface VisibilityAnalysisOptions {
22
+ callback?: (result: AnalysisResultInstance) => void;
23
+ }
24
+ /** 创建环视分析参数 */
25
+ interface LookAroundAnalysisOptions {
26
+ callback?: (result: AnalysisResultInstance) => void;
27
+ }
28
+ /** 创建可视域分析参数 */
29
+ interface VisualFieldAnalysisOptions {
30
+ callback?: (result: AnalysisResultInstance) => void;
31
+ }
32
+ /** 地形开挖分析参数 */
33
+ interface ClipPlanAnalysisOptions {
34
+ /** 高度 */
35
+ height?: number;
36
+ /** 裁剪大小 */
37
+ splitNum?: number;
38
+ /** 四周贴图 */
39
+ wallImg?: string;
40
+ /** 底部贴图 */
41
+ bottomImg?: string;
42
+ callback?: (result: unknown) => void;
43
+ }
44
+ /** 淹没分析参数 */
45
+ interface SubmergedAnalysisOptions {
46
+ /** 最大高度 */
47
+ maxH?: number;
48
+ /** 速度 */
49
+ speed?: number;
50
+ /** 时间间隔 */
51
+ interval?: number;
52
+ /** 材质 */
53
+ matrialUrl?: string;
54
+ }
55
+ /** 坡度分析参数 */
56
+ interface SlopeAnalysisOptions {
57
+ callback?: (result: AnalysisResultInstance) => void;
58
+ }
59
+ /** 方量分析参数 */
60
+ interface CutVolumeAnalysisOptions {
61
+ callback?: (result: AnalysisResultInstance) => void;
62
+ }
63
+ /** 分析模块内部使用的公共实例(由 Base / Draw / Math3d / Graphics 混入) */
64
+ interface AnalysisSharedInstance {
65
+ _viewer: any;
66
+ _analysisLayer: any;
67
+ _graphicsLayer: any;
68
+ _drawLayer: any;
69
+ /** 释放当前模块持有的监听器 / DataSource(幂等) */
70
+ destroy(): void;
71
+ getDfSt(attrArr: string[]): string | undefined;
72
+ bindHandleEvent(options?: BindHandleEventOptions): void;
73
+ /** @deprecated 拼写有误,请使用 `bindHandleEvent` */
74
+ bindHandelEvent(options?: BindHandleEventOptions): void;
75
+ createGraphics(): any;
76
+ drawLineGraphics(options?: DrawMethodOptions): void;
77
+ drawCircleGraphics(options?: DrawMethodOptions): void;
78
+ drawPolygonGraphics(options?: DrawMethodOptions): void;
79
+ drawWallGraphics(options?: DrawMethodOptions): void;
80
+ computeEllipseEdgePositions(options?: {
81
+ semiMinorAxis: number;
82
+ semiMajorAxis: number;
83
+ rotation: number;
84
+ center: any;
85
+ granularity?: number;
86
+ angle?: number;
87
+ }): {
88
+ numPts: number;
89
+ outerPositions: number[];
90
+ } | undefined;
91
+ computeInterpolateLineCartographic(start?: {
92
+ longitude: number;
93
+ latitude: number;
94
+ height?: number;
95
+ }, end?: {
96
+ longitude: number;
97
+ latitude: number;
98
+ height?: number;
99
+ }, _Delta?: number): any[] | null;
100
+ computeCartographicPointsTerrainData(Cartographics: any[], callback?: (result: any[]) => void): void;
101
+ computeInterpolateIndexLineHeightCartographic(start?: {
102
+ longitude: number;
103
+ latitude: number;
104
+ height?: number;
105
+ }, end?: {
106
+ longitude: number;
107
+ latitude: number;
108
+ height?: number;
109
+ }, num?: number, index?: number): any | null;
110
+ }
111
+ /** Analysis 实例类型 */
112
+ interface AnalysisInstance extends AnalysisSharedInstance {
113
+ $math3d: Math3dInstance;
114
+ $graphics: GraphicsInstance;
115
+ /** 创建通视分析 */
116
+ createVisibilityAnalysis(options?: VisibilityAnalysisOptions): void;
117
+ /** 创建环视分析 */
118
+ createLookAroundAnalysis(options?: LookAroundAnalysisOptions): void;
119
+ /** 创建可视域分析 */
120
+ createVisualFieldAnalysis(options?: VisualFieldAnalysisOptions): void;
121
+ /** 地形开挖分析 */
122
+ createClipPlanAnalysis(options?: ClipPlanAnalysisOptions): void;
123
+ /** 创建淹没分析 */
124
+ createSubmergedAnalysis(options?: SubmergedAnalysisOptions): void;
125
+ /** 创建坡度分析 */
126
+ createSlopeAnalysis(options?: SlopeAnalysisOptions): boolean | void;
127
+ /** 方量分析 */
128
+ createCutVolumeAnalysis(options?: CutVolumeAnalysisOptions): void;
129
+ }
130
+
131
+ /** new Analysis(...) 返回的实例结构 */
132
+ interface AnalysisExtendsApi {
133
+ /** cesium viewer 实例 */
134
+ viewer: Viewer;
135
+ /** Analysis 模块实例(已混入 Base 等方法) */
136
+ analysis: AnalysisInstance & BaseInstance;
137
+ }
138
+ /**
139
+ * 空间分析模块(单独引入版)
140
+ */
141
+ declare const Analysis: SingleImportConstructor<AnalysisExtendsApi>;
142
+
143
+ export { type AnalysisInstance as A, Analysis as a, type AnalysisExtendsApi as b };
@@ -0,0 +1,143 @@
1
+ import { S as SingleImportConstructor } from './Base-_BOXyMdS.js';
2
+ import { a as BindHandleEventOptions, V as Viewer, B as BaseInstance } from './Base-DH8H9suE.js';
3
+ import { M as Math3dInstance } from './Math3d-t635PYzU.js';
4
+ import { G as GraphicsInstance } from './Graphics-CuFNsQ3b.js';
5
+
6
+ /** 模块内部持有的 cesium 全局对象 */
7
+ /** 画笔类方法的通用参数(Analysis 中调用的 draw* 方法) */
8
+ interface DrawMethodOptions {
9
+ type?: string;
10
+ clampToGround?: boolean;
11
+ height?: number;
12
+ style?: Record<string, unknown>;
13
+ callback?: (...args: any[]) => void;
14
+ [key: string]: unknown;
15
+ }
16
+ /** 通视/环视/坡度/方量等分析实例(含 remove 方法) */
17
+ interface AnalysisResultInstance {
18
+ remove(): void;
19
+ }
20
+ /** 创建通视分析参数 */
21
+ interface VisibilityAnalysisOptions {
22
+ callback?: (result: AnalysisResultInstance) => void;
23
+ }
24
+ /** 创建环视分析参数 */
25
+ interface LookAroundAnalysisOptions {
26
+ callback?: (result: AnalysisResultInstance) => void;
27
+ }
28
+ /** 创建可视域分析参数 */
29
+ interface VisualFieldAnalysisOptions {
30
+ callback?: (result: AnalysisResultInstance) => void;
31
+ }
32
+ /** 地形开挖分析参数 */
33
+ interface ClipPlanAnalysisOptions {
34
+ /** 高度 */
35
+ height?: number;
36
+ /** 裁剪大小 */
37
+ splitNum?: number;
38
+ /** 四周贴图 */
39
+ wallImg?: string;
40
+ /** 底部贴图 */
41
+ bottomImg?: string;
42
+ callback?: (result: unknown) => void;
43
+ }
44
+ /** 淹没分析参数 */
45
+ interface SubmergedAnalysisOptions {
46
+ /** 最大高度 */
47
+ maxH?: number;
48
+ /** 速度 */
49
+ speed?: number;
50
+ /** 时间间隔 */
51
+ interval?: number;
52
+ /** 材质 */
53
+ matrialUrl?: string;
54
+ }
55
+ /** 坡度分析参数 */
56
+ interface SlopeAnalysisOptions {
57
+ callback?: (result: AnalysisResultInstance) => void;
58
+ }
59
+ /** 方量分析参数 */
60
+ interface CutVolumeAnalysisOptions {
61
+ callback?: (result: AnalysisResultInstance) => void;
62
+ }
63
+ /** 分析模块内部使用的公共实例(由 Base / Draw / Math3d / Graphics 混入) */
64
+ interface AnalysisSharedInstance {
65
+ _viewer: any;
66
+ _analysisLayer: any;
67
+ _graphicsLayer: any;
68
+ _drawLayer: any;
69
+ /** 释放当前模块持有的监听器 / DataSource(幂等) */
70
+ destroy(): void;
71
+ getDfSt(attrArr: string[]): string | undefined;
72
+ bindHandleEvent(options?: BindHandleEventOptions): void;
73
+ /** @deprecated 拼写有误,请使用 `bindHandleEvent` */
74
+ bindHandelEvent(options?: BindHandleEventOptions): void;
75
+ createGraphics(): any;
76
+ drawLineGraphics(options?: DrawMethodOptions): void;
77
+ drawCircleGraphics(options?: DrawMethodOptions): void;
78
+ drawPolygonGraphics(options?: DrawMethodOptions): void;
79
+ drawWallGraphics(options?: DrawMethodOptions): void;
80
+ computeEllipseEdgePositions(options?: {
81
+ semiMinorAxis: number;
82
+ semiMajorAxis: number;
83
+ rotation: number;
84
+ center: any;
85
+ granularity?: number;
86
+ angle?: number;
87
+ }): {
88
+ numPts: number;
89
+ outerPositions: number[];
90
+ } | undefined;
91
+ computeInterpolateLineCartographic(start?: {
92
+ longitude: number;
93
+ latitude: number;
94
+ height?: number;
95
+ }, end?: {
96
+ longitude: number;
97
+ latitude: number;
98
+ height?: number;
99
+ }, _Delta?: number): any[] | null;
100
+ computeCartographicPointsTerrainData(Cartographics: any[], callback?: (result: any[]) => void): void;
101
+ computeInterpolateIndexLineHeightCartographic(start?: {
102
+ longitude: number;
103
+ latitude: number;
104
+ height?: number;
105
+ }, end?: {
106
+ longitude: number;
107
+ latitude: number;
108
+ height?: number;
109
+ }, num?: number, index?: number): any | null;
110
+ }
111
+ /** Analysis 实例类型 */
112
+ interface AnalysisInstance extends AnalysisSharedInstance {
113
+ $math3d: Math3dInstance;
114
+ $graphics: GraphicsInstance;
115
+ /** 创建通视分析 */
116
+ createVisibilityAnalysis(options?: VisibilityAnalysisOptions): void;
117
+ /** 创建环视分析 */
118
+ createLookAroundAnalysis(options?: LookAroundAnalysisOptions): void;
119
+ /** 创建可视域分析 */
120
+ createVisualFieldAnalysis(options?: VisualFieldAnalysisOptions): void;
121
+ /** 地形开挖分析 */
122
+ createClipPlanAnalysis(options?: ClipPlanAnalysisOptions): void;
123
+ /** 创建淹没分析 */
124
+ createSubmergedAnalysis(options?: SubmergedAnalysisOptions): void;
125
+ /** 创建坡度分析 */
126
+ createSlopeAnalysis(options?: SlopeAnalysisOptions): boolean | void;
127
+ /** 方量分析 */
128
+ createCutVolumeAnalysis(options?: CutVolumeAnalysisOptions): void;
129
+ }
130
+
131
+ /** new Analysis(...) 返回的实例结构 */
132
+ interface AnalysisExtendsApi {
133
+ /** cesium viewer 实例 */
134
+ viewer: Viewer;
135
+ /** Analysis 模块实例(已混入 Base 等方法) */
136
+ analysis: AnalysisInstance & BaseInstance;
137
+ }
138
+ /**
139
+ * 空间分析模块(单独引入版)
140
+ */
141
+ declare const Analysis: SingleImportConstructor<AnalysisExtendsApi>;
142
+
143
+ export { type AnalysisInstance as A, Analysis as a, type AnalysisExtendsApi as b };