cesium_dev_kit 1.0.73 → 1.0.75

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/README.md CHANGED
@@ -4,83 +4,88 @@
4
4
  [![NPM Package][npm]][npm-url]
5
5
  [![NPM DownloadsWeekly][npm-download]][npmtrends-url]
6
6
  [![Build Size][build-size]][build-size-url]
7
- [![GitHub Repo stars][repo-stars]][build-status]
7
+ [![GitHub Repo stars][repo-stars]][star-chart]
8
8
  [![license][license-uri]][license-link]
9
9
 
10
- ## 简介
10
+ **English** | [中文](./README.zh-CN.md)
11
11
 
12
- 这是一个 Cesium 开发工具包,包含图层加载、坐标转换、坐标拾取、相机控制、测量、标绘、模型加载、模型平移旋转缩放、模型/3Dtiles 视角位置调整、模型拖拽、天气(雨,雪,雾)场景、雷达扫描、信息框、流动线、发光线、动态墙等各种发光材质、后置场景效果、通视分析、透视分析、坡度分析、淹没分析、方量分析、地形开挖等各种分析案例。
12
+ ## Introduction
13
13
 
14
- ## 功能展示
14
+  This is a Cesium development kit that includes functionalities such as layer loading, coordinate conversion, coordinate picking, camera control, measurement, plotting, model loading and manipulation (translation, rotation scaling), 3Dtiles view position adjustment, weather effects (rain, snow, fog), scene rendering with radar scan and information box display capabilities. It also provides features for flow line visualization, lighting effects including dynamic wall and other luminous materials rendering.
15
+ Additionally it supports Post effects, visibility analysis tools for perspective analysis and slope analysis. Furthermore it offers Inundation analysis as well as volume analysis capabilities and terrain excavation functionality.
15
16
 
16
- - 材质
17
+ ## Features
18
+
19
+ - materials
17
20
  ![material](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/material.gif)
18
- - 分析
21
+ - analysis
19
22
  ![analysis](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/analysis.gif)
20
- - 标绘
23
+ - plotting
21
24
  ![plot](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/plot.gif)
22
- - 拖拽
25
+ - dragging
23
26
  ![drag](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/drag.gif)
24
- - 雷达扫描
27
+ - radar scan
25
28
  ![radar](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/radar.gif)
26
- - 第一人称漫游
27
- ![radar](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathRoam.gif)
29
+ - First-person roaming
30
+ ![roaming](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathRoam.gif)
28
31
 
29
- ## 在线预览
32
+ ## Preview
30
33
 
31
- [https://www.benpaodehenji.com/cesiumDevKit](https://www.benpaodehenji.com/cesiumDevKit)
34
+ [https://benpaodehenji.com/cesiumDevKit](https://benpaodehenji.com/cesiumDevKit)
32
35
 
33
- ## 安装
36
+ ## Install
34
37
 
35
38
  ```shell
36
39
  npm install cesium_dev_kit
37
40
  ```
38
41
 
39
- ## 引入
42
+ ## Import
40
43
 
41
44
  ```
42
45
  import { initCesium } from 'cesium_dev_kit'
43
46
  ```
44
47
 
45
- ## 使用
46
-
47
- ### 1、完整引入
48
-
49
- 通过初始化`initCesium` 可以获取到所有扩展模块
50
-
51
- ### 1.1 initCesium 参数配置
52
-
53
- | Property | Type | Description | Default Value |
54
- | -------------- | ------ | ----------------------------------------------------------------------------- | ------------- |
55
- | cesiumGlobal | Object | Ceiusm 对象 | '' |
56
- | containerId | String | dom 容器 id | '' |
57
- | viewerConfig | Object | viewer 基础配置(与官网一致) | {} |
58
- | extreaConfig | Object | 额外参数配置,如 {logo:true// 是否显示 logo, depthTest:true //开启深度检测} | {} |
59
- | MapImageryList | Array | 配置底图,参考 ImageryProvider | [] |
60
- | defaultStatic | Array | 着色器使用的静态资源配置(如图片 url) | '' |
61
-
62
- ### 1.2 initCesium 返回对象
63
-
64
- | name | Type | Description |
65
- | ------------------ | ------ | ------------------------------------------------ |
66
- | viewer | Object | Ceiusm 实例对象 |
67
- | material | Object | 材质模块(修改实体材质) |
68
- | graphics | Object | 图形模块(如创建 PolygonGraphics 对象等) |
69
- | math3d | Object | 三维数学工具 |
70
- | primitive | Object | 图元操作对象(如使用 primivite 创建 polygon 等) |
71
- | draw | Object | 绘制模块(如多边形,矩形) |
72
- | passEffect | Object | 后置处理模块 |
73
- | customCesiumPlugin | Object | 自定义传感器扩展 |
74
- | control | Object | 控制模块(如模型位置调整,拖拽等) |
75
- | plugin | Object | 额外插件(如拓展 css3 的动画 ,地形裁剪) |
76
- | base | Object | 基础模块(如坐标转换,图层初始化等) |
77
- | analysis | Object | 分析模块(如坡度,坡向,可视域,通视分析) |
78
- | attackArrowObj | Object | 标绘(攻击) |
79
- | straightArrowObj | Object | 标绘(直击) |
80
- | pincerArrowObj | Object | 标绘(钳击) |
81
- | ThreeJs | Object | 集成 ThreeJS 扩展对象 |
82
-
83
- ### 1.3 使用案例
48
+ ## Use
49
+
50
+ ### 1、Import all
51
+
52
+ The initialization of 'initCesium' allows for the acquisition of all extension modules.
53
+
54
+ ### 1.1 The initCesium method configuration parameter list
55
+
56
+ | Property | Type | Description | Default |
57
+ | ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- | --------- |
58
+ | cesiumGlobal | Object | Cesium Object | undefined |
59
+ | threeGlobal | Object | THREE Object | undefined |
60
+ | containerId | String | Cesium mounts dom container id | undefined |
61
+ | threeContainerId | String | Three mounts dom container id | undefined |
62
+ | viewerConfig | Object | viewer base configuration (same as official website) | {} |
63
+ | extreaConfig | Object | Configure additional parameters, such as {logo: true// Whether to display logo, depthTest: true// Enable depth detection} | {} |
64
+ | MapImageryList | Array | To configure the base image, see ImageryProvider | [] |
65
+ | defaultStatic | Array | Static resource configurations used by shaders (such as image urls) | undefined |
66
+
67
+ ### 1.2 The initCesium method returns the result
68
+
69
+ | name | Type | Description |
70
+ | ------------------ | ------ | ------------------------------------------------------------------------------ |
71
+ | viewer | Object | Cesium instance object |
72
+ | material | Object | Material module (Modify physical material) |
73
+ | graphics | Object | Graphics modules (e.g. creating PolygonGraphics objects, etc.) |
74
+ | math3d | Object | Three-dimensional mathematical tool |
75
+ | primitive | Object | Primitives manipulate objects (such as creating polygon using primivite, etc.) |
76
+ | draw | Object | Drawing modules (e.g. polygons, rectangles) |
77
+ | passEffect | Object | Post-processing module |
78
+ | customCesiumPlugin | Object | Custom sensor extensions |
79
+ | control | Object | Control modules (such as model positioning, dragging, etc.) |
80
+ | plugin | Object | Additional plugins (such as expanding css3 animation, terrain cropping) |
81
+ | base | Object | Basic modules (e.g. coordinate conversion, layer initialization, etc.) |
82
+ | analysis | Object | Analysis modules (e.g., slope, direction, visibility, visibility analysis) |
83
+ | attackArrowObj | Object | Plotting (attack) |
84
+ | straightArrowObj | Object | Plotting (straight hit) |
85
+ | pincerArrowObj | Object | Plotting(Pincer attack) |
86
+ | ThreeJs | Object | Integrate ThreeJS extension objects |
87
+
88
+ ### 1.3 Use case
84
89
 
85
90
  ```javaScript
86
91
  // test.vue
@@ -99,7 +104,7 @@ export default {
99
104
  const tempData = [
100
105
  {
101
106
  id: 3,
102
- name: '高德地图02',
107
+ name: 'gaodeMap02',
103
108
  type: 'UrlTemplateImageryProvider',
104
109
  classConfig: {
105
110
  url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
@@ -132,29 +137,30 @@ export default {
132
137
  }
133
138
  }
134
139
  </script>
140
+
135
141
  ```
136
142
 
137
- ### 2、按需引入
143
+ ### 2、Import on demand
138
144
 
139
- 可根据功能需求导出单一扩展类,减少代码冗余
145
+ The import of a single extension class can be tailored to meet specific functional requirements, thereby minimizing code redundancy.
140
146
 
141
147
  ```javaScript
142
- import {Graphics, Material,Primitive,Draw,Analysis,CustomCesiumPlugin,PassEffect,Plugin,ThreeJs} from 'cesium_dev_kit'
148
+ import {Graphics, Material,Primitive,Draw,Analysis,CustomCesiumPlugin,PassEffect,Plugin,ThreeJs} from 'cesium_dev_kit'
143
149
  ```
144
150
 
145
- ### 2.1 扩展类:
151
+ ### 2.1 Extension class:
146
152
 
147
- - Graphics:各种图形操作
148
- - Material: 材质操作
149
- - Primitive: 配合 shader 的各种图元操作
150
- - Draw: 各种绘制对象
151
- - Analysis: 各种分析对象
152
- - CustomCesiumPlugin: 自定义相控扩展
153
- - PassEffect: 后期特效对象
154
- - Plugin: 各种扩展功能
155
- - ThreeJs: 集成 ThreeJS 扩展对象
153
+ - Graphics:Various graphic operations
154
+ - Material: Material manipulation
155
+ - Primitive: Cooperate with various primitive operations of shader
156
+ - Draw: Various drawing objects
157
+ - Analysis: Various analysis objects
158
+ - CustomCesiumPlugin: Custom sensor expansion
159
+ - PassEffect: Post effect object
160
+ - Plugin: Various extension functions
161
+ - ThreeJs: Integrate ThreeJS extension objects
156
162
 
157
- ### 2.2 Draw 使用案例:
163
+ ### 2.2 Draw Use case:
158
164
 
159
165
  ```javaScript
160
166
  // test.vue
@@ -172,7 +178,7 @@ export default {
172
178
  const tempData = [
173
179
  {
174
180
  id: 3,
175
- name: '高德地图02',
181
+ name: 'gaodeMap02',
176
182
  type: 'UrlTemplateImageryProvider',
177
183
  classConfig: {
178
184
  url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
@@ -188,18 +194,18 @@ export default {
188
194
  }]
189
195
 
190
196
  const drawObj = new Draw({
191
- cesiumGlobal: Cesium, // 全局Cesium对象
192
- containerId: 'cesiumContainer', // 容器id
193
- viewerConfig: { // 同官方的viewer配置相同
197
+ cesiumGlobal: Cesium, //Global Cesium object
198
+ containerId: 'cesiumContainer', // Container id
199
+ viewerConfig: { // Same as the official viewer configuration
194
200
  infoBox: false,
195
201
  shouldAnimate: true,
196
202
  },
197
- extraConfig: {// 其他配置
198
- logo:true, // 是否显示logo
199
- depthTest:true // 是否开启深度测试
203
+ extraConfig: {// Other configuration
204
+ logo:true, // Whether to display logo
205
+ depthTest:true // Whether to enable the depth test
200
206
  },
201
- MapImageryList: tempData // 底图配置
202
- defaultStatic // 默认服务器地址以及材质等基础信息配置,具体请参考src\views\example\defaultStaticConf\index.js
207
+ MapImageryList: tempData // Base map configuration
208
+ defaultStatic // default server address and material and other basic information configuration, please refer to src\views\example\defaultStaticConf\index.js
203
209
  })
204
210
 
205
211
  this.c_viewer = drawObj.viewer
@@ -217,51 +223,97 @@ export default {
217
223
  </script>
218
224
  ```
219
225
 
220
- ### 如需在 H5 中使用
226
+ ### Used in h5
221
227
 
222
- - html 中直接引入 index.umd.js
228
+ - Import index.umd.js directly into html
223
229
 
224
230
  ```javaScript
225
231
  <script type="text/javascript" src="index.umd.js"></script>
226
232
  ```
227
233
 
228
- - 初始化对象
234
+ - Initialize object
229
235
 
230
236
  ```javaScript
231
237
  new cesium_dev_kit.initCesium({...})
232
238
  ```
233
239
 
234
- ## 使用范例
240
+ ## Use example
235
241
 
236
- - ES6 使用案例
242
+ - ES6 Use case
237
243
  [https://github.com/dengxiaoning/cesium_kit_test](https://github.com/dengxiaoning/cesium_kit_test)
238
244
 
239
- - H5 使用案例
245
+ - H5 Use case
240
246
  [https://github.com/dengxiaoning/cesium_kit_test_h5](https://github.com/dengxiaoning/cesium_kit_test_h5)
241
247
 
242
248
  ##
243
249
 
244
- ## 浏览器支持
250
+ ## Browser support
245
251
 
246
- 本地开发推荐使用`Chrome 80+` 浏览器
252
+ The 'Chrome 80+' browser is recommended for local development
247
253
 
248
- 支持现代(chrome,Firefox,Microsoft edge,etc.)浏览器, 不支持 IE
254
+ Modern browsers (chrome, Firefox, Microsoft edge, etc.) are supported. Internet Explorer is not supported
249
255
 
250
- ## 鸣谢
256
+ ## Thanks
251
257
 
252
258
  [cesium-d3kit](https://github.com/zhangti0708/cesium-d3kit)<br/>
253
259
  [drawarrowforcesium](https://gitcode.net/mirrors/gitgitczl/drawarrowforcesium)<br/>
254
260
  [vue3-ts-cesium-map-show](https://gitee.com/hawk86104/vue3-ts-cesium-map-show)<br/>
255
261
 
256
- 本项目包括但不限于借鉴和参考以上资料,非常感谢作者分享
262
+ This project includes but is not limited to the reference and reference of the above materials, thank you very much for sharing
263
+
264
+ ## Project deficiency and optimization
265
+
266
+ - 1、Extended classes not using type detection (TS)
267
+ - 2、No usage documentation (please refer to the case)
268
+ - 3、No exception catching and handling
269
+
270
+ ## How to contribute
271
+
272
+ <a href="https://github.com/dengxiaoning/cesium_dev_kit/graphs/contributors">
273
+ <img src="https://contrib.rocks/image?repo=dengxiaoning/cesium_dev_kit" />
274
+ </a>
275
+
276
+ You can [Raise an issue](https://github.com/dengxiaoning/cesium_dev_kit/issues/new) Or submit a Pull Request.
277
+
278
+ **Pull Request:**
279
+
280
+ 1. Fork code
281
+ 2. Create your own branch: `git checkout -b feat/xxxx`
282
+ 3. Submit your changes: `git commit -am 'feat(function): add xxxxx'`
283
+ 4. Push your branch: `git push origin feat/xxxx`
284
+ 5. submit `pull request`
285
+
286
+ ## Git Contribution submission specification
287
+
288
+ - `feat` New features
289
+ - `fix` Fix bugs
290
+ - `docs` document
291
+ - `style` Format and style (changes that do not affect code operation)
292
+ - `refactor` Refactor
293
+ - `perf` Optimize related, such as improving performance and experience
294
+ - `test` Add test
295
+ - `build` Compilation related modifications, changes to project construction or dependencies
296
+ - `ci` Continuous integration modification
297
+ - `chore` Changes in the construction process or auxiliary tools
298
+ - `revert` Rollback to previous version
299
+ - `workflow` Workflow improvement
300
+ - `mod` Uncertain modification classification
301
+ - `wip` Under development
302
+ - `types` type
303
+
304
+ <small>Welcome interested friends to join together to improve the function, so that the work is more efficient, the development is simpler, and the life is more comfortable.</small>
305
+
306
+ ## `Star`
307
+
308
+ I am grateful to the those good people who awarded me These stars, and I appreciate your ongoing support. :heart:
309
+
310
+ [![Stargazers repo roster for @dengxiaoning/cesium_dev_kit][stargazers-url]][stargazers-link]
257
311
 
258
- ## 项目不足与优化
312
+ ## `Fork`
259
313
 
260
- - 1、扩展类未使用类型检测(TS)
261
- - 2、未配备使用文档(请参考案例)
262
- - 3、未作异常捕捉和处理
314
+ @sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` Thank you for your attention. :heart:
263
315
 
264
- <small>欢迎感兴趣朋友加入一起完善功能,让工作效更高效、开发更简单、生活更惬意。</small>
316
+ [![Forkers repo roster for @dengxiaoning/cesium_dev_kit][forkers-url]][forkers-link]
265
317
 
266
318
  [npm]: https://img.shields.io/npm/v/cesium_dev_kit
267
319
  [npm-url]: https://www.npmjs.com/package/cesium_dev_kit
@@ -274,3 +326,8 @@ new cesium_dev_kit.initCesium({...})
274
326
  [build-status]: https://github.com/dengxiaoning/cesium_dev_kit
275
327
  [build-main]: https://img.shields.io/github/actions/workflow/status/dengxiaoning/cesium_dev_kit/project-build.yml?branch=main&logo=github
276
328
  [repo-stars]: https://img.shields.io/github/stars/dengxiaoning/cesium_dev_kit?style=plastic&logo=github
329
+ [forkers-url]: https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
330
+ [forkers-link]: https://github.com/dengxiaoning/cesium_dev_kit/network/members
331
+ [stargazers-url]: https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
332
+ [stargazers-link]: https://github.com/dengxiaoning/cesium_dev_kit/stargazers
333
+ [star-chart]: https://api.star-history.com/svg?repos=dengxiaoning/cesium_dev_kit&type=Date