cesium_dev_kit 1.1.21 → 1.1.23
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/CHANGELOG.md +60 -0
- package/README.md +293 -291
- package/README.zh-CN.md +274 -0
- package/SECURITY.md +21 -0
- package/dist/Analysis-BLpVrGfg.d.mts +143 -0
- package/dist/Analysis-DmO1gtgS.d.ts +143 -0
- package/dist/Base-DH8H9suE.d.mts +635 -0
- package/dist/Base-DH8H9suE.d.ts +635 -0
- package/dist/Base-_BOXyMdS.d.ts +43 -0
- package/dist/Base-skqjcPfo.d.mts +43 -0
- package/dist/Control-B7AMFmHe.d.ts +98 -0
- package/dist/Control-BrpRU7RP.d.mts +98 -0
- package/dist/CustomCesiumPlugin-BqgAvlhi.d.ts +29 -0
- package/dist/CustomCesiumPlugin-CKYQ-7i9.d.mts +29 -0
- package/dist/Draw-1NhPP8z3.d.mts +490 -0
- package/dist/Draw-DRh7yNzc.d.ts +490 -0
- package/dist/Graphics-CuFNsQ3b.d.ts +1565 -0
- package/dist/Graphics-QE3Gb43w.d.mts +1565 -0
- package/dist/Material-CeZ4l-tY.d.mts +165 -0
- package/dist/Material-Cqbyf2Pn.d.ts +165 -0
- package/dist/Math3d-0nO-vFbT.d.mts +179 -0
- package/dist/Math3d-t635PYzU.d.ts +179 -0
- package/dist/PassEffect-DEFyytQZ.d.ts +41 -0
- package/dist/PassEffect-DEgElnVk.d.mts +41 -0
- package/dist/Plugin-BPCX0zTu.d.mts +197 -0
- package/dist/Plugin-DnYT0bue.d.ts +197 -0
- package/dist/Primitive-BNXp-9_6.d.mts +199 -0
- package/dist/Primitive-UEAuUimH.d.ts +199 -0
- package/dist/ThreeJs-BAlEWxa1.d.mts +44 -0
- package/dist/ThreeJs-DpAcw_qf.d.ts +44 -0
- package/dist/analysis.cjs +145 -0
- package/dist/analysis.cjs.map +1 -0
- package/dist/analysis.d.mts +6 -0
- package/dist/analysis.d.ts +6 -0
- package/dist/analysis.mjs +145 -0
- package/dist/analysis.mjs.map +1 -0
- package/dist/control.cjs +140 -0
- package/dist/control.cjs.map +1 -0
- package/dist/control.d.mts +4 -0
- package/dist/control.d.ts +4 -0
- package/dist/control.mjs +140 -0
- package/dist/control.mjs.map +1 -0
- package/dist/custom-cesium-plugin.cjs +507 -0
- package/dist/custom-cesium-plugin.cjs.map +1 -0
- package/dist/custom-cesium-plugin.d.mts +4 -0
- package/dist/custom-cesium-plugin.d.ts +4 -0
- package/dist/custom-cesium-plugin.mjs +507 -0
- package/dist/custom-cesium-plugin.mjs.map +1 -0
- package/dist/default-static.cjs +3 -0
- package/dist/default-static.cjs.map +1 -0
- package/dist/default-static.d.mts +37 -0
- package/dist/default-static.d.ts +37 -0
- package/dist/default-static.mjs +3 -0
- package/dist/default-static.mjs.map +1 -0
- package/dist/draw.cjs +140 -0
- package/dist/draw.cjs.map +1 -0
- package/dist/draw.d.mts +6 -0
- package/dist/draw.d.ts +6 -0
- package/dist/draw.mjs +140 -0
- package/dist/draw.mjs.map +1 -0
- package/dist/graphics.cjs +140 -0
- package/dist/graphics.cjs.map +1 -0
- package/dist/graphics.d.mts +19 -0
- package/dist/graphics.d.ts +19 -0
- package/dist/graphics.mjs +140 -0
- package/dist/graphics.mjs.map +1 -0
- package/dist/index.cjs +1030 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +338 -0
- package/dist/index.d.ts +338 -0
- package/dist/index.mjs +1030 -0
- package/dist/index.mjs.map +1 -0
- package/dist/material.cjs +391 -0
- package/dist/material.cjs.map +1 -0
- package/dist/material.d.mts +4 -0
- package/dist/material.d.ts +4 -0
- package/dist/material.mjs +391 -0
- package/dist/material.mjs.map +1 -0
- package/dist/pass-effect.cjs +416 -0
- package/dist/pass-effect.cjs.map +1 -0
- package/dist/pass-effect.d.mts +4 -0
- package/dist/pass-effect.d.ts +4 -0
- package/dist/pass-effect.mjs +416 -0
- package/dist/pass-effect.mjs.map +1 -0
- package/dist/plugin.cjs +141 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.mts +4 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.mjs +141 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/primitive.cjs +370 -0
- package/dist/primitive.cjs.map +1 -0
- package/dist/primitive.d.mts +4 -0
- package/dist/primitive.d.ts +4 -0
- package/dist/primitive.mjs +370 -0
- package/dist/primitive.mjs.map +1 -0
- package/dist/three.cjs +140 -0
- package/dist/three.cjs.map +1 -0
- package/dist/three.d.mts +4 -0
- package/dist/three.d.ts +4 -0
- package/dist/three.mjs +140 -0
- package/dist/three.mjs.map +1 -0
- package/package.json +289 -46
- package/dist/index.js +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.umd.js +0 -1
- package/index.js +0 -37
package/README.md
CHANGED
|
@@ -1,291 +1,293 @@
|
|
|
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.zh-CN.md)
|
|
11
|
-
|
|
12
|
-
## Introduction
|
|
13
|
-
|
|
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.
|
|
16
|
-
|
|
17
|
-
## API documentation
|
|
18
|
-
|
|
19
|
-
See [:bookmark_tabs: https://
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| ![
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
<img alt="
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
[
|
|
241
|
-
[
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
[
|
|
277
|
-
|
|
278
|
-
[
|
|
279
|
-
[
|
|
280
|
-
[
|
|
281
|
-
[
|
|
282
|
-
[
|
|
283
|
-
[
|
|
284
|
-
[
|
|
285
|
-
[
|
|
286
|
-
[
|
|
287
|
-
[
|
|
288
|
-
[
|
|
289
|
-
[
|
|
290
|
-
[
|
|
291
|
-
[
|
|
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.zh-CN.md)
|
|
11
|
+
|
|
12
|
+
## Introduction
|
|
13
|
+
|
|
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.
|
|
16
|
+
|
|
17
|
+
## API documentation
|
|
18
|
+
|
|
19
|
+
See [:bookmark_tabs: https://dengxiaoning.github.io/cesium_dev_kit/](https://dengxiaoning.github.io/cesium_dev_kit/)
|
|
20
|
+
|
|
21
|
+
The docs are generated from the JSDoc comments under `src/utils/cesiumPluginsExtends` (TypeDoc):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run docs # output to docs/
|
|
25
|
+
npm run docs:serve # local preview at http://localhost:5174
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Pushing to `main` triggers `.github/workflows/docs.yml`, which builds and deploys to GitHub Pages.
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
|  |  |  |
|
|
33
|
+
| :-------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: |
|
|
34
|
+
| material | analysis | plot |
|
|
35
|
+
|  |  |  |
|
|
36
|
+
| dynamicRiver | extrude | effect |
|
|
37
|
+
|  |  |  |
|
|
38
|
+
| radar | roaming | drag |
|
|
39
|
+
|  |  |  |
|
|
40
|
+
| rayCast | fireworksEffect | aniSoldier |
|
|
41
|
+
|  |  |  |
|
|
42
|
+
| pathPlan | customPrimitive | clusterLayer |
|
|
43
|
+
|  |  |  |
|
|
44
|
+
| bar3D | rollerBlind | heatmap3d |
|
|
45
|
+
|
|
46
|
+
[More>>](https://benpaodehenji.com/cesiumDevKit)
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
npm install cesium_dev_kit cesium
|
|
52
|
+
# optional: only needed for the Three.js integration
|
|
53
|
+
npm install three
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> Requires Cesium `>=1.105`. `three`, `echarts`, `dat.gui` and `libgif` are optional peer dependencies (installed only when their features are used).
|
|
57
|
+
> The library no longer ships a Cesium Ion token. Pass your own token via
|
|
58
|
+
> `extraConfig.AccessToken` or set `Cesium.Ion.defaultAccessToken` before creating the viewer.
|
|
59
|
+
|
|
60
|
+
## Quick start
|
|
61
|
+
|
|
62
|
+
### Import only what you need (recommended)
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import * as Cesium from 'cesium'
|
|
66
|
+
import { Graphics } from 'cesium_dev_kit/graphics'
|
|
67
|
+
|
|
68
|
+
// Your own token, e.g. from an environment variable
|
|
69
|
+
Cesium.Ion.defaultAccessToken = import.meta.env.VITE_CESIUM_ION_TOKEN
|
|
70
|
+
|
|
71
|
+
const { viewer, graphics, dispose } = Graphics({
|
|
72
|
+
cesiumGlobal: Cesium,
|
|
73
|
+
containerId: 'cesiumContainer'
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
graphics.flyTo({
|
|
77
|
+
position: { x: -1337132, y: 5330611, z: 3228680 }
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
// Call this when the page / route is unmounted
|
|
81
|
+
dispose()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Each subpath only bundles its own dependency graph. For example
|
|
85
|
+
`cesium_dev_kit/graphics` does not pull in `echarts` or `dat.gui`.
|
|
86
|
+
Available subpaths: `/graphics`, `/material`, `/primitive`, `/draw`, `/analysis`,
|
|
87
|
+
`/plugin`, `/pass-effect`, `/control`, `/three`, `/custom-cesium-plugin`,
|
|
88
|
+
`/default-static`.
|
|
89
|
+
|
|
90
|
+
### Default images and assets
|
|
91
|
+
|
|
92
|
+
Many helpers (sky box, point icon, light cone, water, analysis textures) fall
|
|
93
|
+
back to a small set of default images. If you do not pass `defaultStatic`, the
|
|
94
|
+
kit uses its built-in CDN config so that a fresh install works without 404s:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import { defaultStatic, createDefaultStatic } from 'cesium_dev_kit/default-static'
|
|
98
|
+
|
|
99
|
+
// 1. Use the built-in CDN (default)
|
|
100
|
+
// 2. Use your own CDN
|
|
101
|
+
const myStatic = createDefaultStatic('https://cdn.example.com/')
|
|
102
|
+
// 3. Use relative paths and self-host ./public/static from this repo
|
|
103
|
+
const localStatic = createDefaultStatic('')
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Import all modules
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import * as Cesium from 'cesium'
|
|
110
|
+
import { initCesium } from 'cesium_dev_kit'
|
|
111
|
+
|
|
112
|
+
const kit = initCesium({
|
|
113
|
+
cesiumGlobal: Cesium,
|
|
114
|
+
containerId: 'cesiumContainer',
|
|
115
|
+
extraConfig: { AccessToken: 'YOUR_CESIUM_ION_TOKEN' }
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
const { viewer, graphics, primitive, analysis } = kit
|
|
119
|
+
// ...
|
|
120
|
+
|
|
121
|
+
// Destroys the viewer created by the kit.
|
|
122
|
+
// If you passed an existing `viewer`, the kit will not destroy it.
|
|
123
|
+
kit.dispose()
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Recommended entry: `createKit`
|
|
127
|
+
|
|
128
|
+
`createKit` takes the same options as `initCesium` but returns an explicit context and has a clearer `dispose()` contract:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import * as Cesium from 'cesium'
|
|
132
|
+
import { createKit } from 'cesium_dev_kit'
|
|
133
|
+
|
|
134
|
+
const kit = createKit({
|
|
135
|
+
Cesium, // `cesiumGlobal` also works
|
|
136
|
+
containerId: 'cesiumContainer',
|
|
137
|
+
assetsBaseUrl: '/static/', // same as createDefaultStatic('/static/')
|
|
138
|
+
extraConfig: { AccessToken: import.meta.env.VITE_CESIUM_ION_TOKEN },
|
|
139
|
+
onError: (err, ctx) => console.warn(ctx?.scope, err)
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
kit.context.viewer // identical to kit.viewer
|
|
143
|
+
kit.graphics.createDynamicCircleGraphics({ /* ... */ })
|
|
144
|
+
kit.dispose() // idempotent; kit.isDisposed() reports the state
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Contract:
|
|
148
|
+
|
|
149
|
+
- If the kit created the viewer, `dispose()` calls `viewer.destroy()`;
|
|
150
|
+
- If you passed your own viewer, `dispose()` only removes DataSources/listeners added by the kit and never destroys your viewer;
|
|
151
|
+
- Multiple kits can coexist on one page — modules no longer share module-level `Cesium` / `dfSt` state;
|
|
152
|
+
- The legacy `new initCesium({...})` form still works but is a compatibility entry; prefer `createKit` for new code.
|
|
153
|
+
|
|
154
|
+
### Error handling
|
|
155
|
+
|
|
156
|
+
Errors thrown by the library are `CesiumDevKitError` with a stable `code`:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import { isCesiumDevKitError, setErrorHandler } from 'cesium_dev_kit'
|
|
160
|
+
|
|
161
|
+
try {
|
|
162
|
+
const kit = createKit({ Cesium, containerId: 'cesiumContainer' })
|
|
163
|
+
} catch (err) {
|
|
164
|
+
if (isCesiumDevKitError(err) && err.code === 'MISSING_VIEWER') {
|
|
165
|
+
// provide a container
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Non-fatal errors caught internally default to console.warn
|
|
170
|
+
setErrorHandler((err, ctx) => console.warn(ctx?.scope, err))
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Codes: `MISSING_CESIUM`, `MISSING_VIEWER`, `INVALID_ARGUMENT`, `IMAGERY_FAILED`,
|
|
174
|
+
`OPTIONAL_DEPENDENCY_MISSING`, `UNSUPPORTED_ENVIRONMENT`, `UNSUPPORTED_CESIUM_VERSION`, `INTERNAL`.
|
|
175
|
+
|
|
176
|
+
> Naming: `craete*` methods now have canonical `create*` names (e.g. `craeteDynamicCricleGraphics` →
|
|
177
|
+
> `createDynamicCircleGraphics`). The old names remain and are marked `@deprecated`.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Used in h5
|
|
181
|
+
|
|
182
|
+
- Import index.umd.js directly into html
|
|
183
|
+
|
|
184
|
+
```javaScript
|
|
185
|
+
<script type="text/javascript" src="index.umd.js"></script>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
- Initialize object
|
|
189
|
+
|
|
190
|
+
```javaScript
|
|
191
|
+
new cesium_dev_kit.initCesium({...})
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Development
|
|
196
|
+
|
|
197
|
+
```shell
|
|
198
|
+
npm install
|
|
199
|
+
npm run dev # demo site
|
|
200
|
+
npm run typecheck
|
|
201
|
+
npm test
|
|
202
|
+
npm run build:lib # dist: ESM + CJS + .d.ts + sourcemaps
|
|
203
|
+
npm run build # demo site
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Use example
|
|
209
|
+
|
|
210
|
+
- Vue Use case
|
|
211
|
+
[https://github.com/dengxiaoning/cesium_kit_test](https://github.com/dengxiaoning/cesium_kit_test)
|
|
212
|
+
|
|
213
|
+
- React Use case
|
|
214
|
+
[https://github.com/dengxiaoning/react-cesium](https://github.com/dengxiaoning/react-cesium)
|
|
215
|
+
- H5 Use case
|
|
216
|
+
[https://github.com/dengxiaoning/cesium_kit_test_h5](https://github.com/dengxiaoning/cesium_kit_test_h5)
|
|
217
|
+
|
|
218
|
+
## Donate
|
|
219
|
+
|
|
220
|
+
Do you use and like cesium_dev_kit but you don’t find a way to show some love? If yes, please consider donating to support this project. Otherwise, no worries, regardless of whether there is support or not, I will keep maintaining this project. Still, if you buy me a cup of coffee I would be more than happy though😄
|
|
221
|
+
|
|
222
|
+
- [](https://paypal.me/xiaoningdeng?country.x=C2&locale.x=en_US)
|
|
223
|
+
|
|
224
|
+
- WeChat / AliPay
|
|
225
|
+
<div style="display: flex">
|
|
226
|
+
<img alt="wechat" title="wechat" src="https://benpaodehenji.com/cesium_dev_kit/static/data/images/wechat.png">
|
|
227
|
+
<img alt="alipay" title="alipay" src="https://benpaodehenji.com/cesium_dev_kit/static/data/images/alipay.png">
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
##
|
|
231
|
+
|
|
232
|
+
## Browser support
|
|
233
|
+
|
|
234
|
+
The 'Chrome 80+' browser is recommended for local development
|
|
235
|
+
|
|
236
|
+
Modern browsers (chrome, Firefox, Microsoft edge, etc.) are supported. Internet Explorer is not supported
|
|
237
|
+
|
|
238
|
+
## Thanks
|
|
239
|
+
|
|
240
|
+
[cesium-d3kit](https://github.com/zhangti0708/cesium-d3kit)<br/>
|
|
241
|
+
[drawarrowforcesium](https://gitcode.net/mirrors/gitgitczl/drawarrowforcesium)<br/>
|
|
242
|
+
[vue3-ts-cesium-map-show](https://gitee.com/hawk86104/vue3-ts-cesium-map-show)<br/>
|
|
243
|
+
|
|
244
|
+
This project includes but is not limited to the reference and reference of the above materials, thank you very much for sharing
|
|
245
|
+
|
|
246
|
+
## Project deficiency and optimization
|
|
247
|
+
|
|
248
|
+
- 1、Cesium-related types are intentionally loose (`any`) to support CDN / global `window.Cesium` usage; precise types can be extended if you install cesium via npm
|
|
249
|
+
- 2、No exception catching and handling
|
|
250
|
+
- 3、Missing unit tests and automated release pipeline
|
|
251
|
+
|
|
252
|
+
## How to contribute
|
|
253
|
+
|
|
254
|
+
This project exists thanks to all the people who contribute.<br/>
|
|
255
|
+
|
|
256
|
+
<a href="https://github.com/dengxiaoning/cesium_dev_kit/graphs/contributors">
|
|
257
|
+
<img src="https://contrib.rocks/image?repo=dengxiaoning/cesium_dev_kit" />
|
|
258
|
+
</a>
|
|
259
|
+
|
|
260
|
+
- If you want to contribute, you can [Raise an issue](https://github.com/dengxiaoning/cesium_dev_kit/issues/new) Or submit a Pull Request.
|
|
261
|
+
|
|
262
|
+
See [CONTRIBUTING](./CONTRIBUTING.md) for more details on donations...
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## `Star`
|
|
267
|
+
|
|
268
|
+
I am grateful to the generous individuals who awarded me these little stars, thank you for your support :heart:
|
|
269
|
+
|
|
270
|
+
[![Stargazers repo roster for @dengxiaoning/cesium_dev_kit][stargazers-url]][stargazers-link]
|
|
271
|
+
|
|
272
|
+
## `Fork`
|
|
273
|
+
|
|
274
|
+
@sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan`... thank you for your attention :heart:
|
|
275
|
+
|
|
276
|
+
[![Forkers repo roster for @dengxiaoning/cesium_dev_kit][forkers-url]][forkers-link]
|
|
277
|
+
|
|
278
|
+
[npm]: https://img.shields.io/npm/v/cesium_dev_kit
|
|
279
|
+
[npm-url]: https://www.npmjs.com/package/cesium_dev_kit
|
|
280
|
+
[build-size]: https://img.shields.io/bundlephobia/minzip/cesium_dev_kit/1.0.70?logo=travis
|
|
281
|
+
[build-size-url]: https://img.shields.io/bundlephobia/minzip/cesium_dev_kit
|
|
282
|
+
[npm-download]: https://img.shields.io/npm/dy/cesium_dev_kit?logo=npm
|
|
283
|
+
[npmtrends-url]: https://www.npmtrends.com/cesium_dev_kit
|
|
284
|
+
[license-uri]: https://img.shields.io/npm/l/cesium_dev_kit.svg
|
|
285
|
+
[license-link]: https://npm.im/cesium_dev_kit
|
|
286
|
+
[build-status]: https://github.com/dengxiaoning/cesium_dev_kit
|
|
287
|
+
[build-main]: https://img.shields.io/github/actions/workflow/status/dengxiaoning/cesium_dev_kit/project-build.yml?branch=main&logo=github
|
|
288
|
+
[repo-stars]: https://img.shields.io/github/stars/dengxiaoning/cesium_dev_kit?style=plastic&logo=github
|
|
289
|
+
[forkers-url]: https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
|
|
290
|
+
[forkers-link]: https://github.com/dengxiaoning/cesium_dev_kit/network/members
|
|
291
|
+
[stargazers-url]: https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=dengxiaoning&repo=cesium_dev_kit
|
|
292
|
+
[stargazers-link]: https://github.com/dengxiaoning/cesium_dev_kit/stargazers
|
|
293
|
+
[star-chart]: https://api.star-history.com/svg?repos=dengxiaoning/cesium_dev_kit&type=Date
|