cesium_dev_kit 1.0.80 → 1.0.82

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
@@ -39,105 +39,15 @@ Additionally it supports Post effects, visibility analysis tools for perspective
39
39
  npm install cesium_dev_kit
40
40
  ```
41
41
 
42
- ## Import
43
-
44
- ```
45
- import { initCesium } from 'cesium_dev_kit'
46
- ```
47
-
48
42
  ## Use
49
43
 
50
44
  ### 1、Import all
51
45
 
52
46
  The initialization of 'initCesium' allows for the acquisition of all extension modules.
53
47
 
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 AccessToken:'', // configure access_token } | {} |
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
89
-
90
48
  ```javaScript
91
- // test.vue
92
- <template>
93
- <div id="cesiumContainer" class="map3d-contaner"></div>
94
- </template>
95
- <script>
96
- import { initCesium } from 'cesium_dev_kit'
97
- import { defaultStatic } from '../defaultStaticConf'
98
- export default {
99
- mounted() {
100
- this.initMap()
101
- },
102
- methods: {
103
- initMap() {
104
- const tempData = [
105
- {
106
- id: 3,
107
- name: 'gaodeMap02',
108
- type: 'UrlTemplateImageryProvider',
109
- classConfig: {
110
- url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
111
- },
112
- interfaceConfig: {},
113
- offset: '0,0',
114
- invertswitch: 0,
115
- filterRGB: '#ffffff',
116
- showswitch: 1,
117
- weigh: 13,
118
- createtime: 1624346908,
119
- updatetime: 1647395260,
120
- }
121
- ]
122
- const { viewer,material,graphics} =
123
- new initCesium({
124
- cesiumGlobal: Cesium,
125
- containerId: 'cesiumContainer',
126
- viewerConfig: {
127
- infoBox: false,
128
- shouldAnimate: true,
129
- },
130
- extraConfig: {
131
- depthTest: true
132
- },
133
- MapImageryList: tempData,
134
- defaultStatic
135
- })
136
- }
137
- }
138
- }
139
- </script>
140
-
49
+ import { initCesium } from 'cesium_dev_kit'
50
+ const { viewer, material, ... } = new initCesium({ cesiumGlobal: Cesium,containerId: 'cesiumContainer',...})
141
51
  ```
142
52
 
143
53
  ### 2、Import on demand
@@ -145,82 +55,17 @@ export default {
145
55
  The import of a single extension class can be tailored to meet specific functional requirements, thereby minimizing code redundancy.
146
56
 
147
57
  ```javaScript
148
- import {Graphics, Material,Primitive,Draw,Analysis,CustomCesiumPlugin,PassEffect,Plugin,ThreeJs} from 'cesium_dev_kit'
149
- ```
150
-
151
- ### 2.1 Extension class:
152
-
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
162
-
163
- ### 2.2 Draw Use case:
164
-
165
- ```javaScript
166
- // test.vue
167
- <template>
168
- <div id="cesiumContainer" class="map3d-contaner"></div>
169
- </template>
170
- <script>
171
- import { Draw } from 'cesium_dev_kit'
172
- export default {
173
- mounted() {
174
- this.initMap()
175
- },
176
- methods: {
177
- initMap() {
178
- const tempData = [
179
- {
180
- id: 3,
181
- name: 'gaodeMap02',
182
- type: 'UrlTemplateImageryProvider',
183
- classConfig: {
184
- url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
185
- },
186
- interfaceConfig: {},
187
- offset: '0,0',
188
- invertswitch: 0,
189
- filterRGB: '#ffffff',
190
- showswitch: 1,
191
- weigh: 13,
192
- createtime: 1624346908,
193
- updatetime: 1647395260,
194
- }]
195
-
196
- const drawObj = new Draw({
197
- cesiumGlobal: Cesium, //Global Cesium object
198
- containerId: 'cesiumContainer', // Container id
199
- viewerConfig: { // Same as the official viewer configuration
200
- infoBox: false,
201
- shouldAnimate: true,
202
- },
203
- extraConfig: {// Other configuration
204
- logo:true, // Whether to display logo
205
- depthTest:true // Whether to enable the depth test
206
- },
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
209
- })
210
-
211
- this.c_viewer = drawObj.viewer
212
- this.draw = drawObj.draw
213
- this.draw.setDefSceneConfig()
214
- this.draw.setBloomLightScene()
215
- this.load3dTiles(drawObj.viewer)
216
-
217
- this.StraightArrowObj = drawObj.straightArrowObj
218
- this.AttackArrowObj = drawObj.attackArrowObj
219
- this.PincerArrowObj = drawObj.pincerArrowObj
220
- }
221
- }
222
- }
223
- </script>
58
+ import {Graphics} from 'cesium_dev_kit'
59
+ const {viewer,graphics} = new Graphics({
60
+ cesiumGlobal: Cesium,
61
+ containerId: 'cesiumContainer'
62
+ })
63
+ graphics.getPointGraphics({
64
+ color:Cesium.Color.GREEN,
65
+ pixelSize:5,
66
+ outlineColor:Cesium.Color.WHITE,
67
+ outlineWidth:1
68
+ })
224
69
  ```
225
70
 
226
71
  ### Used in h5
@@ -237,6 +82,10 @@ export default {
237
82
  new cesium_dev_kit.initCesium({...})
238
83
  ```
239
84
 
85
+ See [API documentation :bookmark_tabs: ](https://benpaodehenji.com/cesiumDevKitDoc) (Cheap server, please be patient) for more details...
86
+
87
+ ---
88
+
240
89
  ## Use example
241
90
 
242
91
  - Vue Use case
@@ -266,8 +115,7 @@ This project includes but is not limited to the reference and reference of the a
266
115
  ## Project deficiency and optimization
267
116
 
268
117
  - 1、Extended classes not using type detection (TS)
269
- - 2、No usage documentation (please refer to the case)
270
- - 3、No exception catching and handling
118
+ - 2、No exception catching and handling
271
119
 
272
120
  ## How to contribute
273
121
 
@@ -279,41 +127,10 @@ This project exists thanks to all the people who contribute.<br/>
279
127
 
280
128
  - If you want to contribute, you can [Raise an issue](https://github.com/dengxiaoning/cesium_dev_kit/issues/new) Or submit a Pull Request.
281
129
 
282
- **Pull Request:**
283
-
284
- - The procedure for submitting a `pull request` is as follows
285
-
286
- 1. Fork [cesium_dev_kit](https://github.com/dengxiaoning/cesium_dev_kit)
287
- 2. Clone a new repository made with forking.
288
- 3. Create your own branch: `git checkout -b feat/xxxx`
289
- 4. Install modules with npm or yarn command.
290
- 5. Let's develop!
291
- 6. Submit your changes: `git commit -am 'feat(function): add xxxxx'`
292
- 7. Push your branch: `git push origin feat/xxxx`
293
- 8. Make a new `pull request` in [cesium_dev_kit](https://github.com/dengxiaoning/cesium_dev_kit) repository.
294
-
295
- ## Git Contribution submission specification
296
-
297
- - `feat` New features
298
- - `fix` Fix bugs
299
- - `docs` document
300
- - `style` Format and style (changes that do not affect code operation)
301
- - `refactor` Refactor
302
- - `perf` Optimize related, such as improving performance and experience
303
- - `test` Add test
304
- - `build` Compilation related modifications, changes to project construction or dependencies
305
- - `ci` Continuous integration modification
306
- - `chore` Changes in the construction process or auxiliary tools
307
- - `revert` Rollback to previous version
308
- - `workflow` Workflow improvement
309
- - `mod` Uncertain modification classification
310
- - `wip` Under development
311
- - `types` type
130
+ See [CONTRIBUTING](./CONTRIBUTING.md) for more details on donations...
312
131
 
313
132
  ---
314
133
 
315
- 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.
316
-
317
134
  ## `Star`
318
135
 
319
136
  I am grateful to the generous individuals who awarded me these little stars, thank you for your support :heart: