u-space 0.0.26 → 0.0.27

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/docs/mcp.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # u-space MCP
2
2
 
3
- `u-space-mcp` 是面向 `u-space` 文档的 Model Context Protocol(MCP)服务器。它把当前文档打包成只读 MCP 工具,方便 Mastra、Claude Desktop、Cursor 等 MCP 客户端在回答 `u-space` API、插件和示例问题时直接检索官方文档,包括 `u-manager` 的 `SemanticLoader`、`SemanticSceneGroup`、`BuildingGroup`、`FloorMesh` 语义楼层 API、楼层 `Facilities` 设备检索与 scene-level auto instancing、设备显隐/颜色/透明度控制、电梯井/通风井语义体块,以及 atmosphere 插件的 `skyBackground()`、`skyEnvironment()` 和 RenderPipeline output effect 配置。
3
+ `u-space-mcp` 是面向 `u-space` 文档的 Model Context Protocol(MCP)服务器。它把当前文档打包成只读 MCP 工具,方便 Mastra、Claude Desktop、Cursor 等 MCP 客户端在回答 `u-space` API、插件和示例问题时直接检索官方文档,包括 `u-manager` 的 `SceneLoader` 语义去重与 path-based model instancing、`SceneInstanceObject` 场景模型引用、`SceneInstancedLayer` 批量渲染层、`SemanticLoader`、`SemanticSceneGroup`、`BuildingGroup`、`FloorMesh` 语义楼层 API、`FacilityInstanceObject` 设备引用、`FacilityInstancedLayer` scene-level batch 渲染层、Facilities auto instancing、camera-based active instance culling、dirty-driven instance sync、楼层 `Facilities` 设备检索与控制、电梯井/通风井语义体块,atmosphere 插件的 `skyBackground()`、`skyEnvironment()` 和 RenderPipeline output effect 配置,以及 fire 插件的 `FireEffect` WebGPU 体积火焰、烟雾、emitter、体积盒、动态光照和 output effect 接入方式。
4
4
 
5
5
  ## 安装与启动
6
6
 
@@ -84,6 +84,32 @@ export const codingAgent = new Agent({
84
84
  | `find_examples` | 查找示例和用法相关文档 |
85
85
  | `get_changelog` | 读取更新日志 |
86
86
 
87
+ ## u-manager 检索范围
88
+
89
+ MCP 文档索引会同步 `docs/api-plugin-u-manager.md` 中的 SceneLoader、SceneInstanceObject、SceneInstancedLayer 和 Facilities 详细 API。客户端可以直接检索以下关键词:
90
+
91
+ | 关键词 / API | 可检索内容 |
92
+ | :----------- | :--------- |
93
+ | `SceneLoader` | 场景树加载、语义 `ID` 去重、重复 3D 模型按 `path` 自动合并、unsupported template 回退普通 `Model`。 |
94
+ | `SceneInstanceObject` | `SceneLoader` path instancing 下的单模型逻辑引用、`id` / `sid` 检索、显隐、颜色、透明度、包围盒、`objectManager.getById()` + `controls.flyToObject()` 飞向单模型,以及事件目标。 |
95
+ | `SceneInstancedLayer` | `SceneLoader` 内部批量渲染层、`BundleGroup` batch、dirty-driven instance buffer 同步、raycast hit remap。 |
96
+ | `FacilityInstanceObject` | 楼层下的 instanced 设备引用、`objectManager.getById()` 全局检索、`getFacilityBoundingBox()` + `controls.flyToBox()` 飞向单设备、单设备显隐、颜色、透明度和事件目标。 |
97
+ | `FacilityInstancedLayer` | `SemanticSceneGroup.facilityLayer`、`addFacilityBatch()`、batch 创建条件、`setInstanceCulling()`、动态 Facilities batch、可选按相机视锥压缩 active instances、可选 `minScreenRadius` 屏幕尺寸裁剪、dirty-driven instance buffer 同步和 raycast hit remap。 |
98
+ | `Facilities` | `SemanticLoader` 解析、`FloorMesh.getFacilityById()`、`SemanticSceneGroup.setFacilityOpacity()`、普通 `Model` fallback 与 scene-level instancing 的差异。 |
99
+
100
+ ## fire 检索范围
101
+
102
+ MCP 文档索引会同步 `docs/api-plugin-fire.md` 中的 FireEffect API、参数和示例。客户端可以直接检索以下关键词:
103
+
104
+ | 关键词 / API | 可检索内容 |
105
+ | :----------- | :--------- |
106
+ | `FireEffect` | 插件创建、`enable()`、`update()`、`setEmitter()`、`reset()`、`disable()` 和 `dispose()`。 |
107
+ | `fire` / `volumetric fire` | WebGPU 体积火焰、烟雾散射、curl noise、buoyancy、Jacobi pressure projection 和 raymarch 输出。 |
108
+ | `emitterGeometry` / `emitterRadius` | 默认 `TeapotGeometry(0.8, 28)`、自定义 emitter 几何、业务 `Object3D` matrix 驱动和移动扰动半径。 |
109
+ | `size` / `gridSize` | 体积盒世界范围、烟雾扩散边界和 3D 模拟网格尺寸。 |
110
+ | `addOutputEffect` | `FireEffect` 通过 RenderPipeline output effect 叠加体积 pass,不占用业务 `setOutputComposer()`。 |
111
+ | `keyLight` / `pointLight` | 体积阴影 spot light、跟随火焰核心的动态点光源和可关闭的内置光源。 |
112
+
87
113
  ## 包结构
88
114
 
89
115
  源码位于 `packages/u-space-mcp`。根目录只保留一个 MCP 发布入口;执行时会先递增 `u-space-mcp` 的 patch 版本,再从 `docs/*.md` 生成内置文档索引,编译 MCP 包,然后发布到 npm:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u-space",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "type": "module",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -62,9 +62,9 @@
62
62
  "3d-tiles-renderer": ">=0.4.28",
63
63
  "@takram/three-geospatial": ">=0.9.1",
64
64
  "@takram/three-atmosphere": ">=0.19.1",
65
- "@types/three": ">=0.184.1",
65
+ "@types/three": ">=0.185.0",
66
66
  "camera-controls": ">=3.1.2",
67
- "postprocessing": ">=6.39.1",
68
- "three": ">=0.184.0"
67
+ "postprocessing": ">=6.39.2",
68
+ "three": ">=0.185.0"
69
69
  }
70
70
  }