cesium_dev_kit
Advanced tools
Comparing version 1.0.74 to 1.0.75
{ | ||
"name": "cesium_dev_kit", | ||
"version": "1.0.74", | ||
"version": "1.0.75", | ||
"description": "封装Cesium常用API-提供相应参考案例,模块化封装-开箱即用-快速实现各类效果。", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
221
README.md
@@ -7,29 +7,32 @@ ## cesium_dev_kit | ||
[![Build Size][build-size]][build-size-url] | ||
[![GitHub Repo stars][repo-stars]][build-status] | ||
[![GitHub Repo stars][repo-stars]][star-chart] | ||
[![license][license-uri]][license-link] | ||
## 简介 | ||
**English** | [中文](./README.zh-CN.md) | ||
这是一个 Cesium 开发工具包,包含图层加载、坐标转换、坐标拾取、相机控制、测量、标绘、模型加载、模型平移旋转缩放、模型/3Dtiles 视角位置调整、模型拖拽、天气(雨,雪,雾)场景、雷达扫描、信息框、流动线、发光线、动态墙等各种发光材质、后置场景效果、通视分析、透视分析、坡度分析、淹没分析、方量分析、地形开挖等各种分析案例。 | ||
## Introduction | ||
## 功能展示 | ||
 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. | ||
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. | ||
- 材质 | ||
## Features | ||
- materials | ||
![material](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/material.gif) | ||
- 分析 | ||
- analysis | ||
![analysis](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/analysis.gif) | ||
- 标绘 | ||
- plotting | ||
![plot](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/plot.gif) | ||
- 拖拽 | ||
- dragging | ||
![drag](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/drag.gif) | ||
- 雷达扫描 | ||
- radar scan | ||
![radar](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/radar.gif) | ||
- 第一人称漫游 | ||
![radar](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathRoam.gif) | ||
- First-person roaming | ||
![roaming](https://github.com/dengxiaoning/cesium_dev_kit/blob/main/src/assets/image/preview/pathRoam.gif) | ||
## 在线预览 | ||
## Preview | ||
[https://www.benpaodehenji.com/cesiumDevKit](https://www.benpaodehenji.com/cesiumDevKit) | ||
[https://benpaodehenji.com/cesiumDevKit](https://benpaodehenji.com/cesiumDevKit) | ||
## 安装 | ||
## Install | ||
@@ -40,3 +43,3 @@ ```shell | ||
## 引入 | ||
## Import | ||
@@ -47,43 +50,43 @@ ``` | ||
## 使用 | ||
## Use | ||
### 1、完整引入 | ||
### 1、Import all | ||
通过初始化`initCesium` 可以获取到所有扩展模块 | ||
The initialization of 'initCesium' allows for the acquisition of all extension modules. | ||
### 1.1 initCesium 参数配置 | ||
### 1.1 The initCesium method configuration parameter list | ||
| Property | Type | Description | Default | | ||
| ---------------- | ------ | ----------------------------------------------------------------------------- | --------- | | ||
| cesiumGlobal | Object | Cesium 对象 | undefined | | ||
| threeGlobal | Object | THREE 对象 | undefined | | ||
| containerId | String | Cesium 挂载 dom 容器 id | undefined | | ||
| threeContainerId | String | Three 挂载 dom 容器 id | undefined | | ||
| viewerConfig | Object | viewer 基础配置(与官网一致) | {} | | ||
| extreaConfig | Object | 额外参数配置,如 {logo:true// 是否显示 logo, depthTest:true //开启深度检测} | {} | | ||
| MapImageryList | Array | 配置底图,参考 ImageryProvider | [] | | ||
| defaultStatic | Array | 着色器使用的静态资源配置(如图片 url) | undefined | | ||
| Property | Type | Description | Default | | ||
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- | --------- | | ||
| cesiumGlobal | Object | Cesium Object | undefined | | ||
| threeGlobal | Object | THREE Object | undefined | | ||
| containerId | String | Cesium mounts dom container id | undefined | | ||
| threeContainerId | String | Three mounts dom container id | undefined | | ||
| viewerConfig | Object | viewer base configuration (same as official website) | {} | | ||
| extreaConfig | Object | Configure additional parameters, such as {logo: true// Whether to display logo, depthTest: true// Enable depth detection} | {} | | ||
| MapImageryList | Array | To configure the base image, see ImageryProvider | [] | | ||
| defaultStatic | Array | Static resource configurations used by shaders (such as image urls) | undefined | | ||
### 1.2 initCesium 返回对象 | ||
### 1.2 The initCesium method returns the result | ||
| name | Type | Description | | ||
| ------------------ | ------ | ------------------------------------------------ | | ||
| viewer | Object | Cesium 实例对象 | | ||
| material | Object | 材质模块(修改实体材质) | | ||
| graphics | Object | 图形模块(如创建 PolygonGraphics 对象等) | | ||
| math3d | Object | 三维数学工具 | | ||
| primitive | Object | 图元操作对象(如使用 primivite 创建 polygon 等) | | ||
| draw | Object | 绘制模块(如多边形,矩形) | | ||
| passEffect | Object | 后置处理模块 | | ||
| customCesiumPlugin | Object | 自定义传感器扩展 | | ||
| control | Object | 控制模块(如模型位置调整,拖拽等) | | ||
| plugin | Object | 额外插件(如拓展 css3 的动画 ,地形裁剪) | | ||
| base | Object | 基础模块(如坐标转换,图层初始化等) | | ||
| analysis | Object | 分析模块(如坡度,坡向,可视域,通视分析) | | ||
| attackArrowObj | Object | 标绘(攻击) | | ||
| straightArrowObj | Object | 标绘(直击) | | ||
| pincerArrowObj | Object | 标绘(钳击) | | ||
| ThreeJs | Object | 集成 ThreeJS 扩展对象 | | ||
| name | Type | Description | | ||
| ------------------ | ------ | ------------------------------------------------------------------------------ | | ||
| viewer | Object | Cesium instance object | | ||
| material | Object | Material module (Modify physical material) | | ||
| graphics | Object | Graphics modules (e.g. creating PolygonGraphics objects, etc.) | | ||
| math3d | Object | Three-dimensional mathematical tool | | ||
| primitive | Object | Primitives manipulate objects (such as creating polygon using primivite, etc.) | | ||
| draw | Object | Drawing modules (e.g. polygons, rectangles) | | ||
| passEffect | Object | Post-processing module | | ||
| customCesiumPlugin | Object | Custom sensor extensions | | ||
| control | Object | Control modules (such as model positioning, dragging, etc.) | | ||
| plugin | Object | Additional plugins (such as expanding css3 animation, terrain cropping) | | ||
| base | Object | Basic modules (e.g. coordinate conversion, layer initialization, etc.) | | ||
| analysis | Object | Analysis modules (e.g., slope, direction, visibility, visibility analysis) | | ||
| attackArrowObj | Object | Plotting (attack) | | ||
| straightArrowObj | Object | Plotting (straight hit) | | ||
| pincerArrowObj | Object | Plotting(Pincer attack) | | ||
| ThreeJs | Object | Integrate ThreeJS extension objects | | ||
### 1.3 使用案例 | ||
### 1.3 Use case | ||
@@ -107,3 +110,3 @@ ```javaScript | ||
id: 3, | ||
name: '高德地图02', | ||
name: 'gaodeMap02', | ||
type: 'UrlTemplateImageryProvider', | ||
@@ -141,25 +144,26 @@ classConfig: { | ||
</script> | ||
``` | ||
### 2、按需引入 | ||
### 2、Import on demand | ||
可根据功能需求导出单一扩展类,减少代码冗余 | ||
The import of a single extension class can be tailored to meet specific functional requirements, thereby minimizing code redundancy. | ||
```javaScript | ||
import {Graphics, Material,Primitive,Draw,Analysis,CustomCesiumPlugin,PassEffect,Plugin,ThreeJs} from 'cesium_dev_kit' | ||
import {Graphics, Material,Primitive,Draw,Analysis,CustomCesiumPlugin,PassEffect,Plugin,ThreeJs} from 'cesium_dev_kit' | ||
``` | ||
### 2.1 扩展类: | ||
### 2.1 Extension class: | ||
- Graphics:各种图形操作 | ||
- Material: 材质操作 | ||
- Primitive: 配合 shader 的各种图元操作 | ||
- Draw: 各种绘制对象 | ||
- Analysis: 各种分析对象 | ||
- CustomCesiumPlugin: 自定义相控扩展 | ||
- PassEffect: 后期特效对象 | ||
- Plugin: 各种扩展功能 | ||
- ThreeJs: 集成 ThreeJS 扩展对象 | ||
- Graphics:Various graphic operations | ||
- Material: Material manipulation | ||
- Primitive: Cooperate with various primitive operations of shader | ||
- Draw: Various drawing objects | ||
- Analysis: Various analysis objects | ||
- CustomCesiumPlugin: Custom sensor expansion | ||
- PassEffect: Post effect object | ||
- Plugin: Various extension functions | ||
- ThreeJs: Integrate ThreeJS extension objects | ||
### 2.2 Draw 使用案例: | ||
### 2.2 Draw Use case: | ||
@@ -182,3 +186,3 @@ ```javaScript | ||
id: 3, | ||
name: '高德地图02', | ||
name: 'gaodeMap02', | ||
type: 'UrlTemplateImageryProvider', | ||
@@ -199,14 +203,14 @@ classConfig: { | ||
const drawObj = new Draw({ | ||
cesiumGlobal: Cesium, // 全局Cesium对象 | ||
containerId: 'cesiumContainer', // 容器id | ||
viewerConfig: { // 同官方的viewer配置相同 | ||
cesiumGlobal: Cesium, //Global Cesium object | ||
containerId: 'cesiumContainer', // Container id | ||
viewerConfig: { // Same as the official viewer configuration | ||
infoBox: false, | ||
shouldAnimate: true, | ||
}, | ||
extraConfig: {// 其他配置 | ||
logo:true, // 是否显示logo | ||
depthTest:true // 是否开启深度测试 | ||
extraConfig: {// Other configuration | ||
logo:true, // Whether to display logo | ||
depthTest:true // Whether to enable the depth test | ||
}, | ||
MapImageryList: tempData // 底图配置 | ||
defaultStatic // 默认服务器地址以及材质等基础信息配置,具体请参考src\views\example\defaultStaticConf\index.js | ||
MapImageryList: tempData // Base map configuration | ||
defaultStatic // default server address and material and other basic information configuration, please refer to src\views\example\defaultStaticConf\index.js | ||
}) | ||
@@ -229,5 +233,5 @@ | ||
### 如需在 H5 中使用 | ||
### Used in h5 | ||
- html 中直接引入 index.umd.js | ||
- Import index.umd.js directly into html | ||
@@ -238,3 +242,3 @@ ```javaScript | ||
- 初始化对象 | ||
- Initialize object | ||
@@ -245,8 +249,8 @@ ```javaScript | ||
## 使用范例 | ||
## Use example | ||
- ES6 使用案例 | ||
- ES6 Use case | ||
[https://github.com/dengxiaoning/cesium_kit_test](https://github.com/dengxiaoning/cesium_kit_test) | ||
- H5 使用案例 | ||
- H5 Use case | ||
[https://github.com/dengxiaoning/cesium_kit_test_h5](https://github.com/dengxiaoning/cesium_kit_test_h5) | ||
@@ -256,9 +260,9 @@ | ||
## 浏览器支持 | ||
## Browser support | ||
本地开发推荐使用`Chrome 80+` 浏览器 | ||
The 'Chrome 80+' browser is recommended for local development | ||
支持现代(chrome,Firefox,Microsoft edge,etc.)浏览器, 不支持 IE | ||
Modern browsers (chrome, Firefox, Microsoft edge, etc.) are supported. Internet Explorer is not supported | ||
## 鸣谢 | ||
## Thanks | ||
@@ -269,15 +273,49 @@ [cesium-d3kit](https://github.com/zhangti0708/cesium-d3kit)<br/> | ||
本项目包括但不限于借鉴和参考以上资料,非常感谢作者分享 | ||
This project includes but is not limited to the reference and reference of the above materials, thank you very much for sharing | ||
## 项目不足与优化 | ||
## Project deficiency and optimization | ||
- 1、扩展类未使用类型检测(TS) | ||
- 2、未配备使用文档(请参考案例) | ||
- 3、未作异常捕捉和处理 | ||
- 1、Extended classes not using type detection (TS) | ||
- 2、No usage documentation (please refer to the case) | ||
- 3、No exception catching and handling | ||
<small>欢迎感兴趣朋友加入一起完善功能,让工作效更高效、开发更简单、生活更惬意。</small> | ||
## How to contribute | ||
<a href="https://github.com/dengxiaoning/cesium_dev_kit/graphs/contributors"> | ||
<img src="https://contrib.rocks/image?repo=dengxiaoning/cesium_dev_kit" /> | ||
</a> | ||
You can [Raise an issue](https://github.com/dengxiaoning/cesium_dev_kit/issues/new) Or submit a Pull Request. | ||
**Pull Request:** | ||
1. Fork code | ||
2. Create your own branch: `git checkout -b feat/xxxx` | ||
3. Submit your changes: `git commit -am 'feat(function): add xxxxx'` | ||
4. Push your branch: `git push origin feat/xxxx` | ||
5. submit `pull request` | ||
## Git Contribution submission specification | ||
- `feat` New features | ||
- `fix` Fix bugs | ||
- `docs` document | ||
- `style` Format and style (changes that do not affect code operation) | ||
- `refactor` Refactor | ||
- `perf` Optimize related, such as improving performance and experience | ||
- `test` Add test | ||
- `build` Compilation related modifications, changes to project construction or dependencies | ||
- `ci` Continuous integration modification | ||
- `chore` Changes in the construction process or auxiliary tools | ||
- `revert` Rollback to previous version | ||
- `workflow` Workflow improvement | ||
- `mod` Uncertain modification classification | ||
- `wip` Under development | ||
- `types` type | ||
<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> | ||
## `Star` | ||
非常感谢留下星星的好心人,感谢您的支持 :heart: | ||
I am grateful to the those good people who awarded me These stars, and I appreciate your ongoing support. :heart: | ||
@@ -288,3 +326,3 @@ [![Stargazers repo roster for @dengxiaoning/cesium_dev_kit][stargazers-url]][stargazers-link] | ||
@sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` :heart: | ||
@sincely、`@ooil929`、 @InPanda、 `luyufanzhi`、AllenChiangCN、`Liquid-Zhangliquan` Thank you for your attention. :heart: | ||
@@ -308,1 +346,2 @@ [![Forkers repo roster for @dengxiaoning/cesium_dev_kit][forkers-url]][forkers-link] | ||
[stargazers-link]: https://github.com/dengxiaoning/cesium_dev_kit/stargazers | ||
[star-chart]: https://api.star-history.com/svg?repos=dengxiaoning/cesium_dev_kit&type=Date |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
815292
8
334
2908