iflow-engine 1.0.7 → 1.0.8
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/dist/assets/hdr/001.hdr +0 -0
- package/dist/assets/svg/rotate-orbit.svg +1 -0
- package/dist/assets/viewcube/cn_back.png +0 -0
- package/dist/assets/viewcube/cn_bottom.png +0 -0
- package/dist/assets/viewcube/cn_front.png +0 -0
- package/dist/assets/viewcube/cn_left.png +0 -0
- package/dist/assets/viewcube/cn_right.png +0 -0
- package/dist/assets/viewcube/cn_top.png +0 -0
- package/dist/assets/viewcube/home.png +0 -0
- package/dist/draco/DRACOLoader.js +739 -0
- package/dist/draco/draco_decoder.js +52 -0
- package/dist/draco/draco_decoder.wasm +0 -0
- package/dist/draco/draco_encoder.js +33 -0
- package/dist/draco/draco_wasm_wrapper.js +104 -0
- package/dist/engine/src/bim-engine.d.ts +51 -0
- package/dist/engine/src/components/ai-chat/index.d.ts +202 -0
- package/dist/engine/src/components/ai-chat/types.d.ts +133 -0
- package/dist/engine/src/components/button-group/index.d.ts +89 -0
- package/dist/engine/src/components/button-group/index.type.d.ts +84 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/ai-chat/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/fullscreen/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/home/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/info/icon.d.ts +1 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/info/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/map/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/measure/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/property/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/section/section-axis/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/section/section-box/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/section/section-menu/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/section/section-plane/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/setting/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-bird/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-menu/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-person/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/buttons/zoom-box/index.d.ts +2 -0
- package/dist/engine/src/components/button-group/toolbar/index.d.ts +4 -0
- package/dist/engine/src/components/collapse/index.d.ts +21 -0
- package/dist/engine/src/components/collapse/types.d.ts +34 -0
- package/dist/engine/src/components/description/index.d.ts +25 -0
- package/dist/engine/src/components/description/types.d.ts +43 -0
- package/dist/engine/src/components/dialog/index.d.ts +87 -0
- package/dist/engine/src/components/dialog/index.type.d.ts +57 -0
- package/dist/engine/src/components/engine/index.d.ts +436 -0
- package/dist/engine/src/components/engine/types.d.ts +31 -0
- package/dist/engine/src/components/measure-panel/index.d.ts +185 -0
- package/dist/engine/src/components/measure-panel/types.d.ts +87 -0
- package/dist/engine/src/components/menu/buttons/four.d.ts +2 -0
- package/dist/engine/src/components/menu/buttons/home.d.ts +2 -0
- package/dist/engine/src/components/menu/buttons/info.d.ts +2 -0
- package/dist/engine/src/components/menu/buttons/second.d.ts +2 -0
- package/dist/engine/src/components/menu/index.d.ts +57 -0
- package/dist/engine/src/components/menu/item.d.ts +12 -0
- package/dist/engine/src/components/menu/types.d.ts +34 -0
- package/dist/engine/src/components/right-key/index.d.ts +55 -0
- package/dist/engine/src/components/right-key/types.d.ts +20 -0
- package/dist/engine/src/components/section-axis-panel/index.d.ts +88 -0
- package/dist/engine/src/components/section-axis-panel/types.d.ts +31 -0
- package/dist/engine/src/components/section-box-panel/index.d.ts +53 -0
- package/dist/engine/src/components/section-box-panel/types.d.ts +60 -0
- package/dist/engine/src/components/section-plane-panel/index.d.ts +48 -0
- package/dist/engine/src/components/section-plane-panel/types.d.ts +22 -0
- package/dist/engine/src/components/tab/index.d.ts +64 -0
- package/dist/engine/src/components/tab/index.type.d.ts +35 -0
- package/dist/engine/src/components/tree/index.d.ts +71 -0
- package/dist/engine/src/components/tree/tree-node.d.ts +60 -0
- package/dist/engine/src/components/tree/types.d.ts +74 -0
- package/dist/engine/src/components/walk-control-panel/index.d.ts +46 -0
- package/dist/engine/src/components/walk-control-panel/types.d.ts +64 -0
- package/dist/engine/src/components/walk-path-panel/index.d.ts +102 -0
- package/dist/engine/src/components/walk-path-panel/types.d.ts +22 -0
- package/dist/engine/src/components/walk-plan-view-panel/index.d.ts +16 -0
- package/dist/engine/src/core/base-dialog-manager.d.ts +57 -0
- package/dist/engine/src/core/base-manager.d.ts +31 -0
- package/dist/engine/src/core/event-emitter.d.ts +36 -0
- package/dist/engine/src/core/manager-registry.d.ts +89 -0
- package/dist/engine/src/index.d.ts +10 -0
- package/dist/engine/src/locales/en-US.d.ts +2 -0
- package/dist/engine/src/locales/types.d.ts +236 -0
- package/dist/engine/src/locales/zh-CN.d.ts +2 -0
- package/dist/engine/src/managers/ai-chat-manager.d.ts +86 -0
- package/dist/engine/src/managers/button-group-manager.d.ts +35 -0
- package/dist/engine/src/managers/component-detail-manager.d.ts +24 -0
- package/dist/engine/src/managers/construct-tree-manager-btn.d.ts +89 -0
- package/dist/engine/src/managers/dialog-manager.d.ts +12 -0
- package/dist/engine/src/managers/engine-info-dialog-manager.d.ts +12 -0
- package/dist/engine/src/managers/engine-manager.d.ts +242 -0
- package/dist/engine/src/managers/measure-dialog-manager.d.ts +24 -0
- package/dist/engine/src/managers/right-key-manager.d.ts +34 -0
- package/dist/engine/src/managers/section-axis-dialog-manager.d.ts +55 -0
- package/dist/engine/src/managers/section-box-dialog-manager.d.ts +58 -0
- package/dist/engine/src/managers/section-plane-dialog-manager.d.ts +35 -0
- package/dist/engine/src/managers/toolbar-manager.d.ts +81 -0
- package/dist/engine/src/managers/walk-control-manager.d.ts +21 -0
- package/dist/engine/src/managers/walk-path-dialog-manager.d.ts +33 -0
- package/dist/engine/src/managers/walk-plan-view-dialog-manager.d.ts +33 -0
- package/dist/engine/src/services/locale.d.ts +35 -0
- package/dist/engine/src/services/theme.d.ts +35 -0
- package/dist/engine/src/themes/presets.d.ts +15 -0
- package/dist/engine/src/themes/types.d.ts +261 -0
- package/dist/engine/src/types/component.d.ts +27 -0
- package/dist/engine/src/types/events.d.ts +104 -0
- package/dist/engine/src/types/measure.d.ts +57 -0
- package/dist/engine/src/utils/icon-manager.d.ts +10 -0
- package/dist/iflow-engine.es.js +16785 -12008
- package/dist/iflow-engine.es.js.map +1 -1
- package/dist/iflow-engine.umd.js +2264 -173
- package/dist/iflow-engine.umd.js.map +1 -1
- package/package.json +3 -3
- package/dist/index.d.ts +0 -1963
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { EngineOptions, ModelLoadOptions, EngineInfo } from '../components/engine';
|
|
2
|
+
import { BaseManager } from '../core/base-manager';
|
|
3
|
+
import { RightKeyManager } from './right-key-manager';
|
|
4
|
+
import { MeasureMode } from '../types/measure';
|
|
5
|
+
import { MeasureUnit, MeasurePrecision } from '../components/measure-panel/types';
|
|
6
|
+
import { SectionBoxRange } from '../components/section-box-panel/types';
|
|
7
|
+
/**
|
|
8
|
+
* 3D 引擎管理器
|
|
9
|
+
* 封装底层 3D 引擎,提供模型加载、相机控制、测量等功能
|
|
10
|
+
*/
|
|
11
|
+
export declare class EngineManager extends BaseManager {
|
|
12
|
+
/** 容器元素 */
|
|
13
|
+
private container;
|
|
14
|
+
/** 引擎实例 */
|
|
15
|
+
private engineInstance;
|
|
16
|
+
/** 右键菜单管理器 */
|
|
17
|
+
rightKey: RightKeyManager | null;
|
|
18
|
+
constructor(container: HTMLElement);
|
|
19
|
+
/**
|
|
20
|
+
* 初始化 3D 引擎
|
|
21
|
+
* @param options 引擎配置选项
|
|
22
|
+
* @returns 是否初始化成功
|
|
23
|
+
*/
|
|
24
|
+
initialize(options?: Omit<EngineOptions, 'container'>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 检查引擎是否已初始化
|
|
27
|
+
* @returns 是否已初始化
|
|
28
|
+
*/
|
|
29
|
+
isInitialized(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 加载模型
|
|
32
|
+
* @param url 模型 URL
|
|
33
|
+
* @param options 加载选项
|
|
34
|
+
*/
|
|
35
|
+
loadModel(url: string, options?: ModelLoadOptions): void;
|
|
36
|
+
/**
|
|
37
|
+
* 获取底层引擎实例
|
|
38
|
+
* @returns 引擎实例
|
|
39
|
+
*/
|
|
40
|
+
getEngine(): any;
|
|
41
|
+
/** 相机回到初始位置 */
|
|
42
|
+
CameraGoHome(): void;
|
|
43
|
+
/** 暂停渲染 */
|
|
44
|
+
pauseRendering(): void;
|
|
45
|
+
/** 恢复渲染 */
|
|
46
|
+
resumeRendering(): void;
|
|
47
|
+
/**
|
|
48
|
+
* 激活测量模式
|
|
49
|
+
* @param mode 测量模式
|
|
50
|
+
*/
|
|
51
|
+
activateMeasure(mode: MeasureMode): void;
|
|
52
|
+
/** 停用测量模式 */
|
|
53
|
+
deactivateMeasure(): void;
|
|
54
|
+
/**
|
|
55
|
+
* 获取当前测量类型
|
|
56
|
+
* @returns 当前测量模式
|
|
57
|
+
*/
|
|
58
|
+
getCurrentMeasureType(): MeasureMode | null;
|
|
59
|
+
clearAllMeasures(): void;
|
|
60
|
+
saveMeasureSetting(setting: {
|
|
61
|
+
unit: MeasureUnit;
|
|
62
|
+
precision: MeasurePrecision;
|
|
63
|
+
}): void;
|
|
64
|
+
activeSection(mode: 'x' | 'y' | 'z' | 'box' | 'face'): void;
|
|
65
|
+
/**
|
|
66
|
+
* 获取当前激活的剖切模式
|
|
67
|
+
* @returns 当前剖切模式,未激活时返回 null
|
|
68
|
+
*/
|
|
69
|
+
getCurrentSectionMode(): 'x' | 'y' | 'z' | 'box' | 'face' | null;
|
|
70
|
+
/**
|
|
71
|
+
* 停用所有剖切功能
|
|
72
|
+
* @remarks 关闭剖切对话框时调用
|
|
73
|
+
*/
|
|
74
|
+
deactivateSection(): void;
|
|
75
|
+
/**
|
|
76
|
+
* 设置剖切盒范围
|
|
77
|
+
* @param range 各轴的剖切范围 (百分比 0-100)
|
|
78
|
+
* @remarks 仅在 'box' 模式下有效
|
|
79
|
+
*/
|
|
80
|
+
setSectionBoxRange(range: SectionBoxRange): void;
|
|
81
|
+
/**
|
|
82
|
+
* 隐藏剖切面(临时隐藏,可恢复)
|
|
83
|
+
* @remarks 配合 recoverSection() 使用
|
|
84
|
+
*/
|
|
85
|
+
hideSection(): void;
|
|
86
|
+
/**
|
|
87
|
+
* 恢复剖切面(从隐藏状态恢复)
|
|
88
|
+
* @remarks 恢复被 hideSection() 隐藏的剖切面
|
|
89
|
+
*/
|
|
90
|
+
recoverSection(): void;
|
|
91
|
+
fitSectionBoxToModel(): void;
|
|
92
|
+
/**
|
|
93
|
+
* 剖切盒适应(缩放到场景整体包围盒)
|
|
94
|
+
* @remarks 对接底层 clipping.scaleBox()
|
|
95
|
+
*/
|
|
96
|
+
scaleSectionBox(): void;
|
|
97
|
+
/**
|
|
98
|
+
* 反向剖切
|
|
99
|
+
* @remarks 对接底层 clipping.reverse()
|
|
100
|
+
*/
|
|
101
|
+
reverseSection(): void;
|
|
102
|
+
/** 激活框选放大功能 */
|
|
103
|
+
activateZoomBox(): void;
|
|
104
|
+
/** 激活第一人称漫游模式 */
|
|
105
|
+
activateFirstPersonMode(): void;
|
|
106
|
+
/** 停用第一人称漫游模式 */
|
|
107
|
+
deactivateFirstPersonMode(): void;
|
|
108
|
+
setWalkSpeed(speed: number): void;
|
|
109
|
+
setWalkGravity(enabled: boolean): void;
|
|
110
|
+
setWalkCollision(enabled: boolean): void;
|
|
111
|
+
toggleMiniMap(): void;
|
|
112
|
+
isFirstPersonModeActive(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* 获取当前选中的构件
|
|
115
|
+
* @returns 选中构件的 URL 和 ID,未选中时返回 null
|
|
116
|
+
*/
|
|
117
|
+
getSelectedComponent(): {
|
|
118
|
+
url: string;
|
|
119
|
+
id: string;
|
|
120
|
+
} | null;
|
|
121
|
+
/**
|
|
122
|
+
* 获取构件属性
|
|
123
|
+
* @param url 模型 URL
|
|
124
|
+
* @param id 构件 ID
|
|
125
|
+
* @param callback 回调函数,接收属性数据
|
|
126
|
+
*/
|
|
127
|
+
getComponentProperties(url: string, id: string, callback: (data: any) => void): void;
|
|
128
|
+
getTypeTreeData(): any[];
|
|
129
|
+
getLevelTreeData(): any[];
|
|
130
|
+
getMajorTreeData(): any[];
|
|
131
|
+
getEngineInfo(): EngineInfo | null;
|
|
132
|
+
/**
|
|
133
|
+
* 添加漫游点
|
|
134
|
+
* 将当前相机位置添加为一个漫游点
|
|
135
|
+
*/
|
|
136
|
+
pathRoamingAddPoint(): void;
|
|
137
|
+
/**
|
|
138
|
+
* 删除指定索引的漫游点
|
|
139
|
+
* @param index 要删除的漫游点索引
|
|
140
|
+
*/
|
|
141
|
+
pathRoamingRemovePoint(index: number): void;
|
|
142
|
+
/**
|
|
143
|
+
* 清除所有漫游点
|
|
144
|
+
*/
|
|
145
|
+
pathRoamingClearPoints(): void;
|
|
146
|
+
/**
|
|
147
|
+
* 获取所有漫游点
|
|
148
|
+
* @returns 漫游点数组
|
|
149
|
+
*/
|
|
150
|
+
pathRoamingGetPoints(): any[];
|
|
151
|
+
/**
|
|
152
|
+
* 跳转到指定漫游点
|
|
153
|
+
* @param index 目标漫游点索引
|
|
154
|
+
*/
|
|
155
|
+
pathRoamingJumpToPoint(index: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* 播放漫游
|
|
158
|
+
* @param options 播放选项,包含时长、循环、回调等配置
|
|
159
|
+
*/
|
|
160
|
+
pathRoamingPlay(options?: {
|
|
161
|
+
duration?: number;
|
|
162
|
+
loop?: boolean;
|
|
163
|
+
onComplete?: () => void;
|
|
164
|
+
onPointComplete?: (pointIndex: number) => void;
|
|
165
|
+
}): void;
|
|
166
|
+
/**
|
|
167
|
+
* 停止漫游
|
|
168
|
+
*/
|
|
169
|
+
pathRoamingStop(): void;
|
|
170
|
+
/**
|
|
171
|
+
* 获取当前高亮(选中)的模型
|
|
172
|
+
* @returns 高亮模型对象,未选中时返回 null
|
|
173
|
+
*/
|
|
174
|
+
getHighlightModels(): any;
|
|
175
|
+
/**
|
|
176
|
+
* 高亮指定模型构件
|
|
177
|
+
*
|
|
178
|
+
* @param models - 要高亮的模型数组,格式: [{ url: string, ids: string[] }]
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* manager.highlightModel([
|
|
182
|
+
* { url: 'https://xxx/models/xxx/', ids: [350518, 350520] }
|
|
183
|
+
* ]);
|
|
184
|
+
*/
|
|
185
|
+
highlightModel(models: {
|
|
186
|
+
url: string;
|
|
187
|
+
ids: number[];
|
|
188
|
+
}[]): void;
|
|
189
|
+
unhighlightAllModels(): void;
|
|
190
|
+
viewScaleToModel(models: {
|
|
191
|
+
url: string;
|
|
192
|
+
ids: number[];
|
|
193
|
+
}[]): void;
|
|
194
|
+
hideModels(models: {
|
|
195
|
+
url: string;
|
|
196
|
+
ids: number[];
|
|
197
|
+
}[]): void;
|
|
198
|
+
showModel(models: {
|
|
199
|
+
url: string;
|
|
200
|
+
ids: number[];
|
|
201
|
+
}[]): void;
|
|
202
|
+
/**
|
|
203
|
+
* 半透明指定模型
|
|
204
|
+
* @param models 要半透明的模型对象
|
|
205
|
+
*/
|
|
206
|
+
translucentModels(models: any): void;
|
|
207
|
+
/**
|
|
208
|
+
* 取消半透明
|
|
209
|
+
*/
|
|
210
|
+
unTranslucentModel(): void;
|
|
211
|
+
/**
|
|
212
|
+
* 隔离指定模型(隐藏其他)
|
|
213
|
+
* @param models 要隔离的模型对象
|
|
214
|
+
*/
|
|
215
|
+
isolateModels(models: any): void;
|
|
216
|
+
/**
|
|
217
|
+
* 半透明其他构件
|
|
218
|
+
* @param models 基准模型对象
|
|
219
|
+
*/
|
|
220
|
+
translucentOtherModels(models: any): void;
|
|
221
|
+
/**
|
|
222
|
+
* 显示所有模型
|
|
223
|
+
*/
|
|
224
|
+
showAllModels(): void;
|
|
225
|
+
/**
|
|
226
|
+
* 批量选择同类模型
|
|
227
|
+
* @param models 基准模型对象
|
|
228
|
+
*/
|
|
229
|
+
batchSelectSameTypeModel(models: any): void;
|
|
230
|
+
/**
|
|
231
|
+
* 批量选择同层模型
|
|
232
|
+
* @param models 基准模型对象
|
|
233
|
+
*/
|
|
234
|
+
batchSelectSameLevelModel(models: any): void;
|
|
235
|
+
/**
|
|
236
|
+
* 批量选择同层同类模型
|
|
237
|
+
* @param models 基准模型对象
|
|
238
|
+
*/
|
|
239
|
+
batchSelectSameLevelTypeModel(models: any): void;
|
|
240
|
+
/** 销毁引擎管理器 */
|
|
241
|
+
destroy(): void;
|
|
242
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
import { MeasureConfig, MeasureResult } from '../components/measure-panel/types';
|
|
3
|
+
import { MeasureMode } from '../types/measure';
|
|
4
|
+
export declare class MeasureDialogManager extends BaseDialogManager {
|
|
5
|
+
private panel;
|
|
6
|
+
private config;
|
|
7
|
+
private unsubscribeMeasureChanged;
|
|
8
|
+
protected get dialogId(): string;
|
|
9
|
+
protected get dialogTitle(): string;
|
|
10
|
+
protected get dialogWidth(): number;
|
|
11
|
+
protected createContent(): HTMLElement;
|
|
12
|
+
protected onDialogCreated(): void;
|
|
13
|
+
private handleMeasureChanged;
|
|
14
|
+
private convertToMeasureResult;
|
|
15
|
+
protected onDialogClose(): void;
|
|
16
|
+
protected onBeforeDestroy(): void;
|
|
17
|
+
getActiveMode(): MeasureMode | null;
|
|
18
|
+
switchMode(mode: MeasureMode): void;
|
|
19
|
+
setMeasureResult(result: MeasureResult | null): void;
|
|
20
|
+
getConfig(): MeasureConfig | null;
|
|
21
|
+
setConfig(partial: Partial<MeasureConfig>, persist?: boolean): void;
|
|
22
|
+
clearAll(): void;
|
|
23
|
+
openSettings(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BaseManager } from '../core/base-manager';
|
|
2
|
+
import { MenuItemConfig } from '../components/menu/item';
|
|
3
|
+
/**
|
|
4
|
+
* 右键菜单管理器
|
|
5
|
+
* 支持注册多个上下文处理器,动态生成右键菜单
|
|
6
|
+
*/
|
|
7
|
+
export declare class RightKeyManager extends BaseManager {
|
|
8
|
+
/** 容器元素 */
|
|
9
|
+
private container;
|
|
10
|
+
/** 右键面板实例 */
|
|
11
|
+
private rightKeyPanel;
|
|
12
|
+
/** 上下文处理器列表 */
|
|
13
|
+
private contextHandlers;
|
|
14
|
+
constructor(container: HTMLElement);
|
|
15
|
+
/** 销毁管理器 */
|
|
16
|
+
destroy(): void;
|
|
17
|
+
/**
|
|
18
|
+
* 注册上下文处理器
|
|
19
|
+
* @param handler 处理器函数,返回菜单项配置
|
|
20
|
+
*/
|
|
21
|
+
registerHandler(handler: (e: MouseEvent) => MenuItemConfig[] | null): void;
|
|
22
|
+
/**
|
|
23
|
+
* 显示菜单
|
|
24
|
+
* @param x 横坐标
|
|
25
|
+
* @param y 纵坐标
|
|
26
|
+
* @param items 菜单项配置
|
|
27
|
+
* @param groupOrder 分组顺序
|
|
28
|
+
*/
|
|
29
|
+
showMenu(x: number, y: number, items: MenuItemConfig[], groupOrder?: string[]): void;
|
|
30
|
+
/** 隐藏菜单 */
|
|
31
|
+
hide(): void;
|
|
32
|
+
/** 处理右键点击事件 */
|
|
33
|
+
private handleContextMenu;
|
|
34
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
import { SectionAxis } from '../components/section-axis-panel/types';
|
|
3
|
+
/**
|
|
4
|
+
* 轴向剖切对话框管理器
|
|
5
|
+
* 继承自 BaseDialogManager,提供 X/Y/Z 轴向剖切的对话框管理功能
|
|
6
|
+
*/
|
|
7
|
+
export declare class SectionAxisDialogManager extends BaseDialogManager {
|
|
8
|
+
/** 轴向剖切面板实例 */
|
|
9
|
+
private panel;
|
|
10
|
+
/** 对话框唯一标识 */
|
|
11
|
+
protected get dialogId(): string;
|
|
12
|
+
/** 对话框标题(国际化 key) */
|
|
13
|
+
protected get dialogTitle(): string;
|
|
14
|
+
/** 对话框宽度 */
|
|
15
|
+
protected get dialogWidth(): number;
|
|
16
|
+
/**
|
|
17
|
+
* 获取对话框位置
|
|
18
|
+
* 定位在容器右下角
|
|
19
|
+
*/
|
|
20
|
+
protected getDialogPosition(): {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 创建对话框内容
|
|
26
|
+
* 初始化轴向剖切面板并设置回调
|
|
27
|
+
*/
|
|
28
|
+
protected createContent(): HTMLElement;
|
|
29
|
+
/** 对话框创建后的回调,自适应高度 */
|
|
30
|
+
protected onDialogCreated(): void;
|
|
31
|
+
/** 对话框关闭时的回调,取消工具栏按钮激活状态 */
|
|
32
|
+
protected onDialogClose(): void;
|
|
33
|
+
/** 销毁前的清理,销毁面板实例 */
|
|
34
|
+
protected onBeforeDestroy(): void;
|
|
35
|
+
/**
|
|
36
|
+
* 获取剖切面隐藏状态
|
|
37
|
+
* @returns 是否隐藏
|
|
38
|
+
*/
|
|
39
|
+
getHiddenState(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 设置剖切面隐藏状态
|
|
42
|
+
* @param isHidden 是否隐藏
|
|
43
|
+
*/
|
|
44
|
+
setHiddenState(isHidden: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* 获取当前激活的剖切轴向
|
|
47
|
+
* @returns 当前轴向 'x' | 'y' | 'z'
|
|
48
|
+
*/
|
|
49
|
+
getActiveAxis(): SectionAxis;
|
|
50
|
+
/**
|
|
51
|
+
* 设置剖切轴向
|
|
52
|
+
* @param axis 目标轴向
|
|
53
|
+
*/
|
|
54
|
+
setActiveAxis(axis: SectionAxis): void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
import { SectionBoxRange } from '../components/section-box-panel/types';
|
|
3
|
+
export declare class SectionBoxDialogManager extends BaseDialogManager {
|
|
4
|
+
private panel;
|
|
5
|
+
private unsubscribeSectionMove;
|
|
6
|
+
/** 对话框唯一标识 */
|
|
7
|
+
protected get dialogId(): string;
|
|
8
|
+
/** 对话框标题(国际化 key) */
|
|
9
|
+
protected get dialogTitle(): string;
|
|
10
|
+
/** 对话框宽度 */
|
|
11
|
+
protected get dialogWidth(): number;
|
|
12
|
+
/**
|
|
13
|
+
* 获取对话框位置
|
|
14
|
+
* 定位在容器右下角
|
|
15
|
+
*/
|
|
16
|
+
protected getDialogPosition(): {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 创建对话框内容
|
|
22
|
+
* 初始化剖切盒面板并设置回调
|
|
23
|
+
*/
|
|
24
|
+
protected createContent(): HTMLElement;
|
|
25
|
+
protected onDialogCreated(): void;
|
|
26
|
+
protected onDialogClose(): void;
|
|
27
|
+
protected onBeforeDestroy(): void;
|
|
28
|
+
/**
|
|
29
|
+
* 获取剖切盒隐藏状态
|
|
30
|
+
* @returns 是否隐藏
|
|
31
|
+
*/
|
|
32
|
+
getHiddenState(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 设置剖切盒隐藏状态
|
|
35
|
+
* @param isHidden 是否隐藏
|
|
36
|
+
*/
|
|
37
|
+
setHiddenState(isHidden: boolean): void;
|
|
38
|
+
/**
|
|
39
|
+
* 获取剖切盒反向状态
|
|
40
|
+
* @returns 是否反向(显示盒内/盒外)
|
|
41
|
+
*/
|
|
42
|
+
getReversedState(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 设置剖切盒反向状态
|
|
45
|
+
* @param isReversed 是否反向
|
|
46
|
+
*/
|
|
47
|
+
setReversedState(isReversed: boolean): void;
|
|
48
|
+
/**
|
|
49
|
+
* 获取剖切盒范围
|
|
50
|
+
* @returns 六面体范围 { minX, maxX, minY, maxY, minZ, maxZ }
|
|
51
|
+
*/
|
|
52
|
+
getRange(): SectionBoxRange | null;
|
|
53
|
+
/**
|
|
54
|
+
* 设置剖切盒范围
|
|
55
|
+
* @param range 部分或全部范围值
|
|
56
|
+
*/
|
|
57
|
+
setRange(range: Partial<SectionBoxRange>): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
/**
|
|
3
|
+
* 拾取面剖切对话框管理器
|
|
4
|
+
* 继承自 BaseDialogManager,提供拾取面剖切功能的对话框管理
|
|
5
|
+
*/
|
|
6
|
+
export declare class SectionPlaneDialogManager extends BaseDialogManager {
|
|
7
|
+
/** 剖切面板实例 */
|
|
8
|
+
private panel;
|
|
9
|
+
/** 对话框唯一标识 */
|
|
10
|
+
protected get dialogId(): string;
|
|
11
|
+
/** 对话框标题(国际化 key) */
|
|
12
|
+
protected get dialogTitle(): string;
|
|
13
|
+
/** 对话框宽度 */
|
|
14
|
+
protected get dialogWidth(): number;
|
|
15
|
+
/** 对话框高度 */
|
|
16
|
+
protected get dialogHeight(): number;
|
|
17
|
+
/** 初始化 */
|
|
18
|
+
init(): void;
|
|
19
|
+
/**
|
|
20
|
+
* 获取对话框位置
|
|
21
|
+
* 定位在容器右下角
|
|
22
|
+
*/
|
|
23
|
+
protected getDialogPosition(): {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
/** 创建对话框内容 */
|
|
28
|
+
protected createContent(): HTMLElement;
|
|
29
|
+
/** 对话框创建后的回调 */
|
|
30
|
+
protected onDialogCreated(): void;
|
|
31
|
+
/** 对话框关闭时的回调 */
|
|
32
|
+
protected onDialogClose(): void;
|
|
33
|
+
/** 销毁前的清理 */
|
|
34
|
+
protected onBeforeDestroy(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ButtonGroupColors, ButtonConfig } from '../components/button-group/index.type';
|
|
2
|
+
import { ThemeConfig } from '../themes/types';
|
|
3
|
+
import { BaseManager } from '../core/base-manager';
|
|
4
|
+
/**
|
|
5
|
+
* 工具栏管理器
|
|
6
|
+
* 提供工具栏按钮的添加、显示/隐藏、主题更新等功能
|
|
7
|
+
*/
|
|
8
|
+
export declare class ToolbarManager extends BaseManager {
|
|
9
|
+
/** 工具栏实例 */
|
|
10
|
+
private toolbar;
|
|
11
|
+
/** 工具栏容器元素 */
|
|
12
|
+
private toolbarContainer;
|
|
13
|
+
/** 主容器元素 */
|
|
14
|
+
private container;
|
|
15
|
+
constructor(container: HTMLElement);
|
|
16
|
+
/** 初始化工具栏 */
|
|
17
|
+
private init;
|
|
18
|
+
/**
|
|
19
|
+
* 更新工具栏主题
|
|
20
|
+
* @param theme 主题配置
|
|
21
|
+
*/
|
|
22
|
+
updateTheme(theme: ThemeConfig): void;
|
|
23
|
+
/** 刷新工具栏渲染 */
|
|
24
|
+
refresh(): void;
|
|
25
|
+
/** 销毁工具栏 */
|
|
26
|
+
destroy(): void;
|
|
27
|
+
/**
|
|
28
|
+
* 添加按钮组
|
|
29
|
+
* @param groupId 组 ID
|
|
30
|
+
* @param beforeGroupId 插入到指定组之前
|
|
31
|
+
*/
|
|
32
|
+
addGroup(groupId: string, beforeGroupId?: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* 添加按钮
|
|
35
|
+
* @param config 按钮配置
|
|
36
|
+
*/
|
|
37
|
+
addButton(config: ButtonConfig): void;
|
|
38
|
+
/**
|
|
39
|
+
* 设置按钮可见性
|
|
40
|
+
* @param id 按钮 ID
|
|
41
|
+
* @param v 是否可见
|
|
42
|
+
*/
|
|
43
|
+
setButtonVisibility(id: string, v: boolean): void;
|
|
44
|
+
/**
|
|
45
|
+
* 设置是否显示标签
|
|
46
|
+
* @param show 是否显示
|
|
47
|
+
*/
|
|
48
|
+
setShowLabel(show: boolean): void;
|
|
49
|
+
/**
|
|
50
|
+
* 设置按钮激活状态
|
|
51
|
+
* @param id 按钮 ID
|
|
52
|
+
* @param active 是否激活
|
|
53
|
+
*/
|
|
54
|
+
setBtnActive(id: string, active?: boolean): void;
|
|
55
|
+
/**
|
|
56
|
+
* 设置工具栏可见性
|
|
57
|
+
* @param visible 是否可见
|
|
58
|
+
*/
|
|
59
|
+
setVisible(visible: boolean): void;
|
|
60
|
+
/**
|
|
61
|
+
* 设置背景颜色
|
|
62
|
+
* @param color 颜色值
|
|
63
|
+
*/
|
|
64
|
+
setBackgroundColor(color: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* 设置按钮组颜色
|
|
67
|
+
* @param colors 颜色配置
|
|
68
|
+
*/
|
|
69
|
+
setColors(colors: ButtonGroupColors): void;
|
|
70
|
+
/** 隐藏工具栏 */
|
|
71
|
+
hide(): void;
|
|
72
|
+
/** 显示工具栏 */
|
|
73
|
+
show(): void;
|
|
74
|
+
/**
|
|
75
|
+
* 获取工具栏容器
|
|
76
|
+
* @returns 容器元素
|
|
77
|
+
*/
|
|
78
|
+
getContainer(): HTMLElement | null;
|
|
79
|
+
setType(type: 'default' | 'glass-pill'): void;
|
|
80
|
+
getType(): 'default' | 'glass-pill';
|
|
81
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseManager } from '../core/base-manager';
|
|
2
|
+
import { WalkControlPanel } from '../components/walk-control-panel';
|
|
3
|
+
/**
|
|
4
|
+
* 漫游控制管理器
|
|
5
|
+
* 提供第一人称漫游、路径漫游等功能的控制界面
|
|
6
|
+
*/
|
|
7
|
+
export declare class WalkControlManager extends BaseManager {
|
|
8
|
+
/** 漫游控制面板实例 */
|
|
9
|
+
panel: WalkControlPanel | null;
|
|
10
|
+
/** 路径漫游对话框管理器 */
|
|
11
|
+
private pathManager;
|
|
12
|
+
constructor();
|
|
13
|
+
/** 初始化管理器 */
|
|
14
|
+
init(): void;
|
|
15
|
+
/** 显示漫游控制面板 */
|
|
16
|
+
show(): void;
|
|
17
|
+
/** 隐藏漫游控制面板 */
|
|
18
|
+
hide(): void;
|
|
19
|
+
/** 销毁管理器 */
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
/**
|
|
3
|
+
* 漫游路径对话框管理器
|
|
4
|
+
* 继承自 BaseDialogManager,提供漫游路径配置的对话框管理功能
|
|
5
|
+
*/
|
|
6
|
+
export declare class WalkPathDialogManager extends BaseDialogManager {
|
|
7
|
+
/** 漫游路径面板实例 */
|
|
8
|
+
private panel;
|
|
9
|
+
/** 对话框唯一标识 */
|
|
10
|
+
protected get dialogId(): string;
|
|
11
|
+
/** 对话框标题(国际化 key) */
|
|
12
|
+
protected get dialogTitle(): string;
|
|
13
|
+
/** 对话框宽度 */
|
|
14
|
+
protected get dialogWidth(): number;
|
|
15
|
+
/** 对话框高度 */
|
|
16
|
+
protected get dialogHeight(): number;
|
|
17
|
+
/** 初始化 */
|
|
18
|
+
init(): void;
|
|
19
|
+
/**
|
|
20
|
+
* 获取对话框位置
|
|
21
|
+
* 定位在容器右上角
|
|
22
|
+
*/
|
|
23
|
+
protected getDialogPosition(): {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
/** 创建对话框内容 */
|
|
28
|
+
protected createContent(): HTMLElement;
|
|
29
|
+
/** 对话框关闭时的回调 */
|
|
30
|
+
protected onDialogClose(): void;
|
|
31
|
+
/** 销毁前的清理 */
|
|
32
|
+
protected onBeforeDestroy(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseDialogManager } from '../core/base-dialog-manager';
|
|
2
|
+
/**
|
|
3
|
+
* 漫游平面图对话框管理器
|
|
4
|
+
* 继承自 BaseDialogManager,提供漫游平面图的对话框管理功能
|
|
5
|
+
*/
|
|
6
|
+
export declare class WalkPlanViewDialogManager extends BaseDialogManager {
|
|
7
|
+
/** 漫游平面图面板实例 */
|
|
8
|
+
private panel;
|
|
9
|
+
/** 对话框唯一标识 */
|
|
10
|
+
protected get dialogId(): string;
|
|
11
|
+
/** 对话框标题(国际化 key) */
|
|
12
|
+
protected get dialogTitle(): string;
|
|
13
|
+
/** 对话框宽度 */
|
|
14
|
+
protected get dialogWidth(): number;
|
|
15
|
+
/** 对话框高度 */
|
|
16
|
+
protected get dialogHeight(): number;
|
|
17
|
+
/** 初始化 */
|
|
18
|
+
init(): void;
|
|
19
|
+
/**
|
|
20
|
+
* 获取对话框位置
|
|
21
|
+
* 定位在容器左下角
|
|
22
|
+
*/
|
|
23
|
+
protected getDialogPosition(): {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
/** 创建对话框内容 */
|
|
28
|
+
protected createContent(): HTMLElement;
|
|
29
|
+
/** 对话框关闭时的回调 */
|
|
30
|
+
protected onDialogClose(): void;
|
|
31
|
+
/** 销毁前的清理 */
|
|
32
|
+
protected onBeforeDestroy(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LocaleType } from '../locales/types';
|
|
2
|
+
type LocaleChangeListener = (locale: LocaleType) => void;
|
|
3
|
+
/**
|
|
4
|
+
* 语言管理器类
|
|
5
|
+
*/
|
|
6
|
+
export declare class LocaleManager {
|
|
7
|
+
private currentLocale;
|
|
8
|
+
private messages;
|
|
9
|
+
private listeners;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* 获取当前语言
|
|
13
|
+
*/
|
|
14
|
+
getLocale(): LocaleType;
|
|
15
|
+
/**
|
|
16
|
+
* 切换语言
|
|
17
|
+
*/
|
|
18
|
+
setLocale(locale: LocaleType): void;
|
|
19
|
+
/**
|
|
20
|
+
* 翻译核心方法
|
|
21
|
+
*/
|
|
22
|
+
t(key: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* 订阅变更
|
|
25
|
+
*/
|
|
26
|
+
subscribe(listener: LocaleChangeListener): () => void;
|
|
27
|
+
private notifyListeners;
|
|
28
|
+
}
|
|
29
|
+
export declare const localeManager: LocaleManager;
|
|
30
|
+
/**
|
|
31
|
+
* 全局翻译函数
|
|
32
|
+
* @param key 键路径 (如 'toolbar.home')
|
|
33
|
+
*/
|
|
34
|
+
export declare const t: (key: string) => string;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ThemeConfig } from '../themes/types';
|
|
2
|
+
type ThemeChangeListener = (theme: ThemeConfig) => void;
|
|
3
|
+
/**
|
|
4
|
+
* 主题管理器 (单例)
|
|
5
|
+
*/
|
|
6
|
+
export declare class ThemeManager {
|
|
7
|
+
private currentTheme;
|
|
8
|
+
private listeners;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* 获取当前主题配置
|
|
12
|
+
*/
|
|
13
|
+
getTheme(): ThemeConfig;
|
|
14
|
+
/**
|
|
15
|
+
* 切换预设主题
|
|
16
|
+
* @param themeName 'dark' | 'light'
|
|
17
|
+
*/
|
|
18
|
+
setTheme(themeName: 'dark' | 'light'): void;
|
|
19
|
+
/**
|
|
20
|
+
* 应用自定义主题配置
|
|
21
|
+
* @param theme 配置对象
|
|
22
|
+
*/
|
|
23
|
+
setCustomTheme(theme: ThemeConfig): void;
|
|
24
|
+
/**
|
|
25
|
+
* 内部应用主题逻辑
|
|
26
|
+
*/
|
|
27
|
+
private applyTheme;
|
|
28
|
+
/**
|
|
29
|
+
* 订阅主题变更
|
|
30
|
+
*/
|
|
31
|
+
subscribe(listener: ThemeChangeListener): () => void;
|
|
32
|
+
private notifyListeners;
|
|
33
|
+
}
|
|
34
|
+
export declare const themeManager: ThemeManager;
|
|
35
|
+
export {};
|