@anov/gis-skills-cli 0.0.0-stage → 0.3.0

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +618 -0
  2. package/INSTALL.md +478 -0
  3. package/LICENSE +15 -0
  4. package/README.md +148 -2
  5. package/RELEASING.md +160 -0
  6. package/bin/anov-gis-skills.mjs +408 -0
  7. package/lib/mcp-config.mjs +273 -0
  8. package/package.json +42 -4
  9. package/skills/anovgis-analysis/SKILL.md +585 -0
  10. package/skills/anovgis-effects/SKILL.md +260 -0
  11. package/skills/anovgis-imagery-terrain/SKILL.md +505 -0
  12. package/skills/anovgis-layers/SKILL.md +627 -0
  13. package/skills/anovgis-materials/SKILL.md +635 -0
  14. package/skills/anovgis-models-3dtiles/SKILL.md +448 -0
  15. package/skills/anovgis-pitfalls/SKILL.md +561 -0
  16. package/skills/anovgis-popup-widget/SKILL.md +474 -0
  17. package/skills/anovgis-primitives/SKILL.md +482 -0
  18. package/skills/anovgis-vector-graphics/SKILL.md +602 -0
  19. package/skills/anovgis-viewer/SKILL.md +618 -0
  20. package/skills/using-anovgis/DEMO-MAP.md +64 -0
  21. package/skills/using-anovgis/DEMO-SKILL-MAP.md +248 -0
  22. package/skills/using-anovgis/DOMAINS.md +183 -0
  23. package/skills/using-anovgis/REFERENCE.md +114 -0
  24. package/skills/using-anovgis/SKILL.md +392 -0
  25. package/skills/using-anovgis/templates/README.md +154 -0
  26. package/skills/using-anovgis/templates/combo1-vue3-vite.md +295 -0
  27. package/skills/using-anovgis/templates/combo2-vue2-cli.md +119 -0
  28. package/skills/using-anovgis/templates/combo3-html-cdn.md +107 -0
  29. package/skills/using-anovgis/templates/combo4-vanilla-webpack.md +91 -0
  30. package/skills/using-anovgis/templates/wizard-profiles.md +105 -0
  31. package/vendor/cesiumjs-skills/LICENSE +201 -0
  32. package/vendor/cesiumjs-skills/NOTICE +18 -0
  33. package/vendor/cesiumjs-skills/skills/cesiumjs-3d-tiles/SKILL.md +465 -0
  34. package/vendor/cesiumjs-skills/skills/cesiumjs-camera/SKILL.md +500 -0
  35. package/vendor/cesiumjs-skills/skills/cesiumjs-core-utilities/SKILL.md +403 -0
  36. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/REFERENCE.md +397 -0
  37. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/SKILL.md +351 -0
  38. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/01-diffuse-tint.js +38 -0
  39. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/02-texture-swap.js +42 -0
  40. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/03-feature-id-tileset.js +29 -0
  41. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/04-translucent-override.js +37 -0
  42. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/05-vertex-displacement.js +49 -0
  43. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/06-metadata-ramp.js +34 -0
  44. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/07-voxel-shader.js +27 -0
  45. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/README.md +19 -0
  46. package/vendor/cesiumjs-skills/skills/cesiumjs-custom-shader/examples/_sandcastle-template.html +9 -0
  47. package/vendor/cesiumjs-skills/skills/cesiumjs-entities/SKILL.md +389 -0
  48. package/vendor/cesiumjs-skills/skills/cesiumjs-imagery/SKILL.md +471 -0
  49. package/vendor/cesiumjs-skills/skills/cesiumjs-interaction/SKILL.md +423 -0
  50. package/vendor/cesiumjs-skills/skills/cesiumjs-materials-shaders/SKILL.md +292 -0
  51. package/vendor/cesiumjs-skills/skills/cesiumjs-models-particles/SKILL.md +423 -0
  52. package/vendor/cesiumjs-skills/skills/cesiumjs-primitives/SKILL.md +537 -0
  53. package/vendor/cesiumjs-skills/skills/cesiumjs-spatial-math/SKILL.md +358 -0
  54. package/vendor/cesiumjs-skills/skills/cesiumjs-terrain-environment/SKILL.md +401 -0
  55. package/vendor/cesiumjs-skills/skills/cesiumjs-time-properties/SKILL.md +353 -0
  56. package/vendor/cesiumjs-skills/skills/cesiumjs-viewer-setup/SKILL.md +434 -0
  57. package/vendor/cesiumjs-skills/skills/using-cesiumjs-skills/SKILL.md +35 -0
@@ -0,0 +1,260 @@
1
+ ---
2
+ name: anovgis-effects
3
+ description: '@anov/gis 特效模块。涵盖 Weather(Rain/Snow/Fog/Cloud)、RoamingController / RoamingPath / KeyboardRoaming、GlobeRotate 全球自转 / AroundPoint 相机环绕 / FlyManager 航线、Effect 7 个后期 stage(Bloom/LensFlare/DepthOfField/Brightness/NightVision/Silhouette/BlackAndWhite)、skybox 天空盒。触发关键词:weather、rain、snow、fog、cloud、roaming、漫游、RoamingPath、KeyboardRoaming、AroundPoint、FlyManager、bloom、lensFlare、depthOfField、nightVision、blackAndWhite、后期、PostFog、rainSnowPlane、雨雪平面、Plane、跟随、dog、键盘漫游、第一人称、firstPerson、GlobeRotate、全球自转、自转、flyTo、航线、skybox、天空盒。Use when 下雨/下雪/起雾/卷云、做路径漫游或键盘漫游、做相机环绕、做航线 FlyManager、配置泛光/景深/夜视/黑白/亮度/轮廓等后期、做全球自转动画、加载雨雪平面粒子、切换天空盒。'
4
+ anov-gis-baseline: 1.8.6
5
+ cesium-baseline: 1.143.0
6
+ ---
7
+ ---
8
+
9
+ # 06 - 特效(effect 模块)
10
+
11
+ > ⚠️ **优先级**:本 skill 优先于 SDK 源码 / `node_modules/@anov/gis/`。
12
+ > 遇到 API 行为疑问先查本 skill 与 `anovgis-pitfalls`。**严禁**主动 Glob/Grep `node_modules/@anov/gis/src/...` / `dist/...`;除非用户明确要求并承担风险。
13
+ > 调试流程见 `using-anovgis` § 默认调试流程(Chrome DevTools 仅第 5 级兜底)。
14
+ >
15
+ > **Cesium 入口(铁律)**:`const Cesium = window.Cesium`。`@anov/gis` 启动时已把 Cesium 挂到 `window`,**不存在** `ANOVGIS.Cesium` 写法;本 skill 所有 `Cesium.*` 均从此变量取。底层 Cesium API 细节查 `cesiumjs-skills` 对应 skill(API 名通用,`import` 写法换成 `const Cesium = window.Cesium`)。
16
+
17
+ > `src/effect/` 下四大子模块:天气(weather)、漫游(roaming)、动画(animation)、后期处理(type/)(仅作语义锚点)。锁定 `@anov/gis` **v1.8.6**(Cesium **1.143.0**)。
18
+
19
+ ## Out-of-scope(v0.2.0 短版)
20
+
21
+ - ❌ 不要写 Cesium 官方 post-process stage 完整 API(仅覆盖 Effect 7 stage) → 见 Cesium 文档
22
+ - ❌ 不要写 CustomShader / 自定义 GLSL → v0.3.0 `anovgis-custom-primitive-worker`
23
+ - ❌ 不要写 viewer.clock 时间播放 + CZML playback 完整用法 → v0.3.0 `anovgis-roaming-editor-time`
24
+ - ❌ 不要写雨雪平面粒子(ParticleSystem) → [`anovgis-models-3dtiles`](../anovgis-models-3dtiles/SKILL.md)(rainSnowPlane)
25
+ - ❌ 不要写 Camera API 详细用法 → [`anovgis-viewer`](../anovgis-viewer/SKILL.md)
26
+
27
+ ## 1. 类速查表
28
+
29
+ <a id="weather"></a>
30
+ ### 1.1 天气 `ANOVGIS.Weather`
31
+
32
+ 通过 `new Weather(viewer)` 一键初始化,自动把 fog/rain/snow/cloud 四个组件挂到 `viewer.weather.*`。每个子组件均带 `enable` 布尔 + 可调 uniform。
33
+
34
+ | 子类 | src | 关键字段 |
35
+ |---|---|---|
36
+ | `Weather` | `src/effect/weather/Weather.js` | `install(viewer)` 后 `viewer.weather` 可用 |
37
+ | `Rain` | `src/effect/weather/type/Rain.js` | `enable`、`speed`、`mixNum` |
38
+ | `Snow` | `src/effect/weather/type/Snow.js` | `enable`、`speed`、`mixNum` |
39
+ | `Fog` | `src/effect/weather/type/Fog.js` | `enable`、`fogByDistance`、`color`(构造时可传 options) |
40
+ | `Cloud` | `src/effect/weather/type/Cloud.js` | `enable`、`rotateAmount` |
41
+
42
+ 构造期属性示例:`new Fog({ fogByDistance: { near: 20, far: 20000, nearValue: 0, farValue: 1.0 }, color: new Cesium.Color(0,0,0,0.3) })`。
43
+
44
+ <a id="roaming"></a>
45
+ ### 1.2 漫游 `ANOVGIS.Roaming*`
46
+
47
+ | 类 | src | 用途 |
48
+ |---|---|---|
49
+ | `RoamingController` | `src/effect/roaming/RoamingController.js` | 多路径容器,`addPath / start(path, viewOption) / stop / clear` |
50
+ | `RoamingPath` | `src/effect/roaming/RoamingPath.js` | 单条路径 `new RoamingPath(positions, duration, pathMode)`,pathMode: `'speed' \| 'time'` |
51
+ | `KeyboardRoaming` | `src/effect/roaming/KeyboardRoaming.js` | W/S/A/D + Q/E 键盘漫游,`enable = true` 即生效 |
52
+
53
+ 事件:`ANOVGIS.PathEventType.{ADD,REMOVE,POST_RENDER,RESET_TIME_LINE,END}` 监听路径生命周期。
54
+
55
+ <a id="animation"></a>
56
+ ### 1.3 动画 `ANOVGIS.Animation*`
57
+
58
+ 入口:直接 `new`,均继承自 `src/effect/animation/Animation.js`。
59
+
60
+ | 类 | src | 用途 |
61
+ |---|---|---|
62
+ | `GlobeRotate` | `src/effect/animation/type/GlobeRotate.js` | 整球自转(基于 ICRF),`start()` + `options.duration` 回调 |
63
+ | `AroundPoint` | `src/effect/animation/type/AroundPoint.js` | 相机环绕目标点,`aroundAmount`(度/帧)控制速度 |
64
+ | `FlyManager` | `src/effect/animation/type/FlyManager.js` | 多站点航线,`routeStops[]` + `loop` + `start/pause/continueFly` |
65
+
66
+ 事件:`ANOVGIS.FlyEventType.{FLYING,STOP_STAY}` 订阅航线状态。
67
+
68
+ `viewer.flyTo`/`flyToPosition`/`flyToPoint` 是 Viewer 上的相机方法(详见 `01-base.md`),不属于 Animation 子类。
69
+
70
+ <a id="effect"></a>
71
+ ### 1.4 后期处理 `ANOVGIS.Effect`
72
+
73
+ `new Effect(viewer)` 在 viewer 上实例化 7 个后期 stage,统一通过 getter 访问:
74
+
75
+ | 字段(getter) | 类型 | 关键 uniform / 行为 | src |
76
+ |---|---|---|---|
77
+ | `viewer.effect.bloom` | Bloom | `contrast / brightness / glowOnly / delta / sigma / stepSize / selected` | `src/effect/type/Bloom.js` |
78
+ | `viewer.effect.lensFlare` | LensFlare | 镜头光晕(太阳眩光) | `src/effect/type/LensFlare.js` |
79
+ | `viewer.effect.depthOfField` | DepthOfField | 景深 | `src/effect/type/DepthOfField.js` |
80
+ | `viewer.effect.brightness` | Brightness | 全局亮度调节 | `src/effect/type/Brightness.js` |
81
+ | `viewer.effect.night` | NightVision | 夜视(绿),`selected` 可仅作用于指定对象 | `src/effect/type/NightVision.js` |
82
+ | `viewer.effect.silhouette` | Silhouette | 描边轮廓 | `src/effect/type/Silhouette.js` |
83
+ | `viewer.effect.blackAndWhite` | BlackAndWhite | 黑白化,`gradations` 控制灰度级数 | `src/effect/type/BlackAndWhite.js` |
84
+
85
+ 每个 stage 公共接口:`stage.enable = true / false`;调 uniform 直接 `stage.contrast = 128`(setter 写穿到 native 的 `uniforms.x`)。
86
+
87
+ 注意:`new ANOVGIS.Effect(viewer)` 必须在 viewer 构造完成后调用,且 skyBox/globe 等选项可先关闭(如 demo dog.html)。
88
+
89
+ ---
90
+
91
+ ## 2. 5 个 snippet
92
+
93
+ ### S1. 下雨 + 雾
94
+
95
+ ```js
96
+ // 来源: examples/public/examples/html/effect/weather.html (L80-96)
97
+ // 一行创建,自动挂 fog/rain/snow/cloud
98
+ const weather = new ANOVGIS.Weather(viewer)
99
+ viewer.weather.rain.enable = true // 开雨
100
+ viewer.weather.rain.speed = 20 // 雨速
101
+ viewer.weather.fog.enable = true // 开雾
102
+ viewer.weather.fog.color = new Cesium.Color(0.6, 0.6, 0.7, 0.4)
103
+ viewer.weather.fog.fogByDistance = { near: 100, nearValue: 0.0, far: 8000, farValue: 1.0 }
104
+ viewer.weather.cloud.enable = true // 云
105
+ viewer.weather.cloud.rotateAmount = 0.04
106
+ ```
107
+
108
+ ### S2. 路径漫游(positions + duration)
109
+
110
+ ```js
111
+ // 来源: examples/public/examples/html/effect/roaming.html (L67-90)
112
+ const rc = new ANOVGIS.RoamingController(viewer)
113
+ const pathPos = [
114
+ [121.46978931, 31.07444714, 0],
115
+ [121.45930009, 31.10311962, 0],
116
+ [121.46385981, 31.16208416, 0],
117
+ ]
118
+ const path = new ANOVGIS.RoamingPath(pathPos, 20) // duration=20s, pathMode='speed' 默认
119
+ rc.addPath(path)
120
+ path.pathEvent.addEventListener(ANOVGIS.PathEventType.END, (endPos) => {
121
+ console.log('path ended at', endPos)
122
+ })
123
+ rc.start(path, { pitch: -45, height: 3000 }) // 俯角/相机高度
124
+ // rc.stop()
125
+ ```
126
+
127
+ <a id="s3"></a>
128
+ ### S3. 相机环绕(AroundPoint)
129
+
130
+ ```js
131
+ // 来源: src/effect/animation/type/AroundPoint.js(demo 中通常配合选中实体)
132
+ // 环绕当前屏幕中心目标;aroundAmount 单位 度/帧
133
+ const around = new ANOVGIS.AroundPoint(viewer)
134
+ around.aroundAmount = 0.3 // 每帧旋转 0.3 度
135
+ around.start() // 自动取屏幕中心坐标作为环绕点
136
+ // around.stop()
137
+ ```
138
+
139
+ ### S4. 泛光(Bloom)后期
140
+
141
+ ```js
142
+ // 来源: src/effect/type/Bloom.js;demo 见 examples/public/examples/html/effect/dog.html L226
143
+ new ANOVGIS.Effect(viewer) // 一次性挂载 7 个 stage
144
+ const bloom = viewer.effect.bloom
145
+ bloom.enable = true
146
+ bloom.contrast = 128 // 0-255
147
+ bloom.brightness = -0.3
148
+ bloom.glowOnly = false // true=仅高亮部分发光
149
+ bloom.sigma = 3.8
150
+ bloom.stepSize = 5
151
+ ```
152
+
153
+ ### S5. 夜视 / 黑白
154
+
155
+ ```js
156
+ // 来源: src/effect/type/NightVision.js、BlackAndWhite.js
157
+ new ANOVGIS.Effect(viewer)
158
+
159
+ // 夜视(绿色滤镜)
160
+ viewer.effect.night.enable = true
161
+ viewer.effect.night.selected = [] // 空数组=全场景;传入 entity 数组可仅作用于选中对象
162
+
163
+ // 黑白
164
+ viewer.effect.blackAndWhite.enable = true
165
+ viewer.effect.blackAndWhite.gradations = 1 // 灰度级数,越大越分层明显
166
+ ```
167
+ ---
168
+ ## 2.1 各特效类实战补充(天气 / 漫游 / 动画 / 后期)
169
+
170
+ ### S6. Rain 下雨(独立开关)
171
+
172
+ ```js
173
+ // 来源: src/effect/weather/type/Rain.js L20-49;demo 见 examples/public/examples/html/effect/weather.html L88-90
174
+ const weather = new ANOVGIS.Weather(viewer)
175
+ viewer.weather.rain.enable = true // 开雨
176
+ viewer.weather.rain.speed = 25 // 雨速(默认 10)
177
+ viewer.weather.rain.mixNum = 0.6 // 雨纹混合度 0-1(默认 0.5)
178
+ // viewer.weather.rain.enable = false // 关
179
+ ```
180
+
181
+ ### S7. Snow 下雪
182
+
183
+ ```js
184
+ // 来源: src/effect/weather/type/Snow.js L20-37;demo 见 weather.html L91-93
185
+ const weather = new ANOVGIS.Weather(viewer)
186
+ viewer.weather.snow.enable = true
187
+ viewer.weather.snow.speed = 8 // 雪速(默认 10;Snow 只有 speed,没有 mixNum)
188
+ // viewer.weather.snow.enable = false
189
+ ```
190
+
191
+ ### S8. Cloud 卷云(球面贴图旋转)
192
+
193
+ ```js
194
+ // 来源: src/effect/weather/type/Cloud.js L19-41;demo 见 weather.html L85-87
195
+ const weather = new ANOVGIS.Weather(viewer)
196
+ viewer.weather.cloud.enable = true
197
+ viewer.weather.cloud.rotateAmount = 0.04 // 弧度/帧,0=静止(默认 0.04)
198
+ // 注意:仅 SceneMode.SCENE3D 生效,setter 里硬校验
199
+ ```
200
+
201
+ ### S9. Fog 起雾(深度雾)
202
+
203
+ ```js
204
+ // 来源: src/effect/weather/type/Fog.js L32-53;demo 见 weather.html L94-96
205
+ // Weather() 安装后直接用 viewer.weather.fog;fogByDistance 是 setter 会拆成 Cartesian4 写入
206
+ const weather = new ANOVGIS.Weather(viewer)
207
+ viewer.weather.fog.enable = true
208
+ viewer.weather.fog.color = new Cesium.Color(0.6, 0.6, 0.7, 0.4) // 雾色(默认 0,0,0,0.3)
209
+ viewer.weather.fog.fogByDistance = { // 整对象赋值,setter 内拆 Cartesian4
210
+ near: 100, nearValue: 0.0,
211
+ far: 8000, farValue: 1.0,
212
+ }
213
+ // viewer.weather.fog.enable = false
214
+ ```
215
+
216
+ ### S10. LensFlare 镜头光晕(太阳眩光)
217
+
218
+ ```js
219
+ // 来源: src/effect/type/LensFlare.js L34-77
220
+ new ANOVGIS.Effect(viewer)
221
+ const flare = viewer.effect.lensFlare
222
+ flare.enable = true
223
+ flare.intensity = 6 // 强度 0-10(默认 6)
224
+ flare.distortion = 61 // 形变程度(默认 61)
225
+ flare.dirtAmount = 0.4 // 屏幕脏污叠加 0-1(默认 0.4)
226
+ flare.haloWidth = 0.4 // 光晕宽度 0-1(默认 0.4)
227
+ // flare.selected = [] // 空数组=全场景;可传入 entity 数组只作用于选中对象
228
+ ```
229
+
230
+ ### S11. DepthOfField 景深
231
+
232
+ ```js
233
+ // 来源: src/effect/type/DepthOfField.js L39-77
234
+ new ANOVGIS.Effect(viewer)
235
+ const dof = viewer.effect.depthOfField
236
+ dof.enable = true
237
+ dof.focalDistance = 87 // 对焦距离(米),前景清晰
238
+ dof.delta = 1 // 焦外模糊增量(默认 1)
239
+ dof.sigma = 3.8 // 模糊半径(默认 3.8)
240
+ dof.stepSize = 2.5 // 采样步长(默认 2.5)
241
+ // dof.selected = [] // 留空=全场景;可指定 entity 数组
242
+ // 关闭:dof.enable = false(注意需 Cesium.PostProcessStageLibrary.isDepthOfFieldSupported)
243
+ ```
244
+
245
+ ---
246
+ ## 3. 速查小结
247
+ - 天气:构造一次后 `viewer.weather.{rain,snow,fog,cloud}.enable` 切换;uniform 改字段即可。
248
+ - `Rain` 字段:`enable` / `speed` / `mixNum`
249
+ - `Snow` 字段:`enable` / `speed`(无 mixNum)
250
+ - `Cloud` 字段:`enable` / `rotateAmount`(仅 3D 模式)
251
+ - `Fog` 字段:`enable` / `color` / `fogByDistance`(setter 内会拆成 Cartesian4 写入)
252
+ - 漫游:`RoamingController` 必传;`RoamingPath` 可独立 `actived = true`,但要自己挂 `POST_RENDER`,建议走 Controller。
253
+ - 动画:`GlobeRotate`/`AroundPoint`/`FlyManager` 独立 new 后 `start()`;`FlyManager.routeStops` 必传(含 position/stopStayTime/duration)。
254
+ - 后期:`new Effect(viewer)` 创建 7 个 stage,`viewer.effect.<name>.enable` 开关,setter 写穿到 native uniforms。
255
+ - `Bloom`:`contrast` / `brightness` / `glowOnly` / `delta` / `sigma` / `stepSize` / `selected`
256
+ - `LensFlare`:`intensity` / `distortion` / `dirtAmount` / `haloWidth` / `selected`
257
+ - `DepthOfField`:`focalDistance` / `delta` / `sigma` / `stepSize` / `selected`
258
+ - `NightVision`:`selected`(绿滤镜,无 intensity 字段)
259
+ - `BlackAndWhite`:`gradations`(灰度级数)
260
+ - `Brightness` / `Silhouette`:基础 enable + 各自 uniform。