cesium_dev_kit 1.0.74 → 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,85 +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 |
54
- | ---------------- | ------ | ----------------------------------------------------------------------------- | --------- |
55
- | cesiumGlobal | Object | Cesium 对象 | undefined |
56
- | threeGlobal | Object | THREE 对象 | undefined |
57
- | containerId | String | Cesium 挂载 dom 容器 id | undefined |
58
- | threeContainerId | String | Three 挂载 dom 容器 id | undefined |
59
- | viewerConfig | Object | viewer 基础配置(与官网一致) | {} |
60
- | extreaConfig | Object | 额外参数配置,如 {logo:true// 是否显示 logo, depthTest:true //开启深度检测} | {} |
61
- | MapImageryList | Array | 配置底图,参考 ImageryProvider | [] |
62
- | defaultStatic | Array | 着色器使用的静态资源配置(如图片 url) | undefined |
63
-
64
- ### 1.2 initCesium 返回对象
65
-
66
- | name | Type | Description |
67
- | ------------------ | ------ | ------------------------------------------------ |
68
- | viewer | Object | Cesium 实例对象 |
69
- | material | Object | 材质模块(修改实体材质) |
70
- | graphics | Object | 图形模块(如创建 PolygonGraphics 对象等) |
71
- | math3d | Object | 三维数学工具 |
72
- | primitive | Object | 图元操作对象(如使用 primivite 创建 polygon 等) |
73
- | draw | Object | 绘制模块(如多边形,矩形) |
74
- | passEffect | Object | 后置处理模块 |
75
- | customCesiumPlugin | Object | 自定义传感器扩展 |
76
- | control | Object | 控制模块(如模型位置调整,拖拽等) |
77
- | plugin | Object | 额外插件(如拓展 css3 的动画 ,地形裁剪) |
78
- | base | Object | 基础模块(如坐标转换,图层初始化等) |
79
- | analysis | Object | 分析模块(如坡度,坡向,可视域,通视分析) |
80
- | attackArrowObj | Object | 标绘(攻击) |
81
- | straightArrowObj | Object | 标绘(直击) |
82
- | pincerArrowObj | Object | 标绘(钳击) |
83
- | ThreeJs | Object | 集成 ThreeJS 扩展对象 |
84
-
85
- ### 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
86
89
 
87
90
  ```javaScript
88
91
  // test.vue
@@ -101,7 +104,7 @@ export default {
101
104
  const tempData = [
102
105
  {
103
106
  id: 3,
104
- name: '高德地图02',
107
+ name: 'gaodeMap02',
105
108
  type: 'UrlTemplateImageryProvider',
106
109
  classConfig: {
107
110
  url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
@@ -134,29 +137,30 @@ export default {
134
137
  }
135
138
  }
136
139
  </script>
140
+
137
141
  ```
138
142
 
139
- ### 2、按需引入
143
+ ### 2、Import on demand
140
144
 
141
- 可根据功能需求导出单一扩展类,减少代码冗余
145
+ The import of a single extension class can be tailored to meet specific functional requirements, thereby minimizing code redundancy.
142
146
 
143
147
  ```javaScript
144
- 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'
145
149
  ```
146
150
 
147
- ### 2.1 扩展类:
151
+ ### 2.1 Extension class:
148
152
 
149
- - Graphics:各种图形操作
150
- - Material: 材质操作
151
- - Primitive: 配合 shader 的各种图元操作
152
- - Draw: 各种绘制对象
153
- - Analysis: 各种分析对象
154
- - CustomCesiumPlugin: 自定义相控扩展
155
- - PassEffect: 后期特效对象
156
- - Plugin: 各种扩展功能
157
- - 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
158
162
 
159
- ### 2.2 Draw 使用案例:
163
+ ### 2.2 Draw Use case:
160
164
 
161
165
  ```javaScript
162
166
  // test.vue
@@ -174,7 +178,7 @@ export default {
174
178
  const tempData = [
175
179
  {
176
180
  id: 3,
177
- name: '高德地图02',
181
+ name: 'gaodeMap02',
178
182
  type: 'UrlTemplateImageryProvider',
179
183
  classConfig: {
180
184
  url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
@@ -190,18 +194,18 @@ export default {
190
194
  }]
191
195
 
192
196
  const drawObj = new Draw({
193
- cesiumGlobal: Cesium, // 全局Cesium对象
194
- containerId: 'cesiumContainer', // 容器id
195
- viewerConfig: { // 同官方的viewer配置相同
197
+ cesiumGlobal: Cesium, //Global Cesium object
198
+ containerId: 'cesiumContainer', // Container id
199
+ viewerConfig: { // Same as the official viewer configuration
196
200
  infoBox: false,
197
201
  shouldAnimate: true,
198
202
  },
199
- extraConfig: {// 其他配置
200
- logo:true, // 是否显示logo
201
- depthTest:true // 是否开启深度测试
203
+ extraConfig: {// Other configuration
204
+ logo:true, // Whether to display logo
205
+ depthTest:true // Whether to enable the depth test
202
206
  },
203
- MapImageryList: tempData // 底图配置
204
- 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
205
209
  })
206
210
 
207
211
  this.c_viewer = drawObj.viewer
@@ -219,61 +223,95 @@ export default {
219
223
  </script>
220
224
  ```
221
225
 
222
- ### 如需在 H5 中使用
226
+ ### Used in h5
223
227
 
224
- - html 中直接引入 index.umd.js
228
+ - Import index.umd.js directly into html
225
229
 
226
230
  ```javaScript
227
231
  <script type="text/javascript" src="index.umd.js"></script>
228
232
  ```
229
233
 
230
- - 初始化对象
234
+ - Initialize object
231
235
 
232
236
  ```javaScript
233
237
  new cesium_dev_kit.initCesium({...})
234
238
  ```
235
239
 
236
- ## 使用范例
240
+ ## Use example
237
241
 
238
- - ES6 使用案例
242
+ - ES6 Use case
239
243
  [https://github.com/dengxiaoning/cesium_kit_test](https://github.com/dengxiaoning/cesium_kit_test)
240
244
 
241
- - H5 使用案例
245
+ - H5 Use case
242
246
  [https://github.com/dengxiaoning/cesium_kit_test_h5](https://github.com/dengxiaoning/cesium_kit_test_h5)
243
247
 
244
248
  ##
245
249
 
246
- ## 浏览器支持
250
+ ## Browser support
247
251
 
248
- 本地开发推荐使用`Chrome 80+` 浏览器
252
+ The 'Chrome 80+' browser is recommended for local development
249
253
 
250
- 支持现代(chrome,Firefox,Microsoft edge,etc.)浏览器, 不支持 IE
254
+ Modern browsers (chrome, Firefox, Microsoft edge, etc.) are supported. Internet Explorer is not supported
251
255
 
252
- ## 鸣谢
256
+ ## Thanks
253
257
 
254
258
  [cesium-d3kit](https://github.com/zhangti0708/cesium-d3kit)<br/>
255
259
  [drawarrowforcesium](https://gitcode.net/mirrors/gitgitczl/drawarrowforcesium)<br/>
256
260
  [vue3-ts-cesium-map-show](https://gitee.com/hawk86104/vue3-ts-cesium-map-show)<br/>
257
261
 
258
- 本项目包括但不限于借鉴和参考以上资料,非常感谢作者分享
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`
259
285
 
260
- ## 项目不足与优化
286
+ ## Git Contribution submission specification
261
287
 
262
- - 1、扩展类未使用类型检测(TS)
263
- - 2、未配备使用文档(请参考案例)
264
- - 3、未作异常捕捉和处理
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
265
303
 
266
- <small>欢迎感兴趣朋友加入一起完善功能,让工作效更高效、开发更简单、生活更惬意。</small>
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>
267
305
 
268
306
  ## `Star`
269
307
 
270
- 非常感谢留下星星的好心人,感谢您的支持 :heart:
308
+ I am grateful to the those good people who awarded me These stars, and I appreciate your ongoing support. :heart:
271
309
 
272
310
  [![Stargazers repo roster for @dengxiaoning/cesium_dev_kit][stargazers-url]][stargazers-link]
273
311
 
274
312
  ## `Fork`
275
313
 
276
- @sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` :heart:
314
+ @sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` Thank you for your attention. :heart:
277
315
 
278
316
  [![Forkers repo roster for @dengxiaoning/cesium_dev_kit][forkers-url]][forkers-link]
279
317
 
@@ -292,3 +330,4 @@ new cesium_dev_kit.initCesium({...})
292
330
  [forkers-link]: https://github.com/dengxiaoning/cesium_dev_kit/network/members
293
331
  [stargazers-url]: https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
294
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