iflow-engine 3.9.203 → 3.9.212
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 +1 -573
- package/dist/bim-engine-2d.d.ts +1 -0
- package/dist/bim-engine-720.d.ts +1 -0
- package/dist/bim-engine-gaussian.d.ts +1 -0
- package/dist/bim-engine-gis.d.ts +2 -1
- package/dist/bim-engine.d.ts +48 -3
- package/dist/components/engine/index.d.ts +1 -17
- package/dist/components/engine-2d/index.d.ts +1 -0
- package/dist/components/engine-720/index.d.ts +1 -0
- package/dist/components/engine-gaussian/index.d.ts +1 -0
- package/dist/components/engine-gis/index.d.ts +1 -0
- package/dist/components/view-dropdown/index.d.ts +3 -1
- package/dist/components/view-dropdown/types.d.ts +4 -2
- package/dist/core/manager-registry.d.ts +8 -0
- package/dist/core/sdk-auth.d.ts +3 -0
- package/dist/cus-bim-engine.d.ts +3 -0
- package/dist/iflow-engine.es.js +106780 -79955
- package/dist/iflow-engine.umd.js +1479 -1479
- package/dist/managers/engine-2d-manager.d.ts +1 -0
- package/dist/managers/engine-720-manager.d.ts +1 -0
- package/dist/managers/engine-gaussian-manager.d.ts +1 -0
- package/dist/managers/engine-gis-manager.d.ts +1 -0
- package/dist/managers/engine-manager.d.ts +1 -0
- package/dist/managers/help-panel-manager.d.ts +11 -0
- package/dist/managers/view-dropdown-manager.d.ts +13 -0
- package/package.json +3 -3
package/dist/bim-engine.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ import { SettingDialogManager } from './managers/setting-dialog-manager';
|
|
|
17
17
|
import { ComponentDetailManager } from './managers/component-detail-manager';
|
|
18
18
|
import { AiChatManager } from './managers/ai-chat-manager';
|
|
19
19
|
import { ConstructTreeManagerBtn } from './managers/construct-tree-manager-btn';
|
|
20
|
+
import { ViewDropdownManager } from './managers/view-dropdown-manager';
|
|
21
|
+
import { HelpPanelManager } from './managers/help-panel-manager';
|
|
20
22
|
import { EngineOptions, ModelLoadOptions } from './components/engine';
|
|
21
23
|
import { LocaleType } from './locales/types';
|
|
22
24
|
import { ThemeType, ThemeConfig } from './themes/types';
|
|
@@ -25,9 +27,11 @@ import { RadialMenuItem } from './components/radial-toolbar/types';
|
|
|
25
27
|
export type { EngineOptions, ModelLoadOptions };
|
|
26
28
|
export type { RadialMenuItem };
|
|
27
29
|
export type { ConstructTreeData, ConstructTreeModelData, ConstructTreeNode, ConstructTreeSearchOptions, ConstructTreeType, } from './managers/engine-manager';
|
|
30
|
+
export type BimEngineMode = 'desktop' | 'mobile' | 'auto';
|
|
28
31
|
export interface BimEngineOptions {
|
|
29
32
|
locale?: LocaleType;
|
|
30
33
|
theme?: ThemeType;
|
|
34
|
+
mode?: BimEngineMode;
|
|
31
35
|
enableRadialToolbar?: boolean;
|
|
32
36
|
enableConstructTree?: boolean;
|
|
33
37
|
enableRightKeyMenu?: boolean;
|
|
@@ -42,11 +46,14 @@ export declare class BimEngine {
|
|
|
42
46
|
private lastSyncedWidth;
|
|
43
47
|
private lastSyncedHeight;
|
|
44
48
|
private registry;
|
|
49
|
+
private readonly mode;
|
|
45
50
|
private readonly uiOptions;
|
|
46
51
|
dialog: DialogManager | null;
|
|
47
52
|
engine: EngineManager | null;
|
|
48
53
|
rightKey: RightKeyManager | null;
|
|
49
54
|
radialToolbar: RadialToolbarManager | null;
|
|
55
|
+
viewDropdown: ViewDropdownManager | null;
|
|
56
|
+
helpPanel: HelpPanelManager | null;
|
|
50
57
|
bottomDock: BottomDockManager | null;
|
|
51
58
|
measureDock: MeasureDockManager | null;
|
|
52
59
|
sectionDock: SectionDockManager | null;
|
|
@@ -76,19 +83,57 @@ export declare class BimEngine {
|
|
|
76
83
|
getLocale(): LocaleType;
|
|
77
84
|
setTheme(theme: 'dark' | 'light'): void;
|
|
78
85
|
setCustomTheme(theme: ThemeConfig): void;
|
|
86
|
+
initialize(options?: Omit<EngineOptions, 'container'>): Promise<boolean>;
|
|
87
|
+
loadModel(urls: string[], options?: ModelLoadOptions): void;
|
|
79
88
|
setPinEditable(editable: boolean): void;
|
|
80
89
|
isPinEditable(): boolean;
|
|
81
90
|
/**
|
|
82
|
-
*
|
|
83
|
-
* 需要 enableRadialToolbar 为 true
|
|
91
|
+
* 向右下角工具栏追加一个外部按钮。
|
|
92
|
+
* 需要 enableRadialToolbar 为 true;关闭工具栏时该方法会静默忽略。
|
|
84
93
|
*/
|
|
85
94
|
addRadialToolbarButton(item: RadialMenuItem): void;
|
|
86
95
|
/**
|
|
87
|
-
*
|
|
96
|
+
* 设置右下角工具栏 toggle 按钮的激活状态。
|
|
88
97
|
* 仅对 isToggle=true 的按钮生效。
|
|
89
98
|
*/
|
|
90
99
|
setRadialToolbarButtonActive(id: string, active: boolean): void;
|
|
100
|
+
loadModelByViewToken(viewToken: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* 解析最终运行模式;auto 会根据触摸能力和容器宽度判断桌面端或移动端。
|
|
103
|
+
*/
|
|
104
|
+
private resolveMode;
|
|
105
|
+
/**
|
|
106
|
+
* 判断当前是否运行桌面端 UI;移动端只保留通用引擎能力。
|
|
107
|
+
*/
|
|
108
|
+
private isDesktopUi;
|
|
109
|
+
/**
|
|
110
|
+
* 初始化入口:先加载通用能力,再按 mode 加载对应 UI。
|
|
111
|
+
*/
|
|
91
112
|
private init;
|
|
113
|
+
/**
|
|
114
|
+
* 初始化基础容器;移动端不会创建任何桌面端状态栏或调试信息。
|
|
115
|
+
*/
|
|
116
|
+
private initContainer;
|
|
117
|
+
/**
|
|
118
|
+
* 初始化桌面端状态信息,包括版本号、模型统计和容器尺寸。
|
|
119
|
+
*/
|
|
120
|
+
private initDesktopStatusUi;
|
|
121
|
+
/**
|
|
122
|
+
* 初始化桌面端和移动端都需要的通用能力,目前只包含 3D 引擎管理器。
|
|
123
|
+
*/
|
|
124
|
+
private initCommonManagers;
|
|
125
|
+
/**
|
|
126
|
+
* 初始化桌面端 UI;所有现有桌面组件都集中在这里,移动端不会执行。
|
|
127
|
+
*/
|
|
128
|
+
private initDesktopUi;
|
|
129
|
+
/**
|
|
130
|
+
* 初始化移动端 UI;当前移动端不加载任何 UI 组件,只保留模型加载能力。
|
|
131
|
+
*/
|
|
132
|
+
private initMobileUi;
|
|
133
|
+
/**
|
|
134
|
+
* 绑定通用事件和全局服务订阅,桌面端和移动端都会执行。
|
|
135
|
+
*/
|
|
136
|
+
private bindCommonEvents;
|
|
92
137
|
private updateTheme;
|
|
93
138
|
private updateClientSizeDisplay;
|
|
94
139
|
private updateEngineStats;
|
|
@@ -47,12 +47,6 @@ export declare class Engine implements IBimComponent {
|
|
|
47
47
|
private currentSectionMode;
|
|
48
48
|
/** 当前选中的构件信息 */
|
|
49
49
|
private selectedComponent;
|
|
50
|
-
private viewDropdownTrigger;
|
|
51
|
-
private viewDropdownMenu;
|
|
52
|
-
private customViewDropdownButtons;
|
|
53
|
-
private infoButton;
|
|
54
|
-
private helpPanel;
|
|
55
|
-
private unsubscribeLocale;
|
|
56
50
|
readonly calibration: CalibrationController;
|
|
57
51
|
/**
|
|
58
52
|
* 构造函数
|
|
@@ -84,6 +78,7 @@ export declare class Engine implements IBimComponent {
|
|
|
84
78
|
* @param options 加载选项(位置、旋转、缩放)
|
|
85
79
|
*/
|
|
86
80
|
loadModel(urls: string[], options?: ModelLoadOptions): void;
|
|
81
|
+
loadModelByViewToken(viewToken: string): Promise<void>;
|
|
87
82
|
private getRawLabel;
|
|
88
83
|
/** 进入一次 3D 模型选点模式,返回模型世界坐标 */
|
|
89
84
|
pickPoint(): Promise<LabelCoordinate | null>;
|
|
@@ -154,18 +149,7 @@ export declare class Engine implements IBimComponent {
|
|
|
154
149
|
captureScreenshot(): void;
|
|
155
150
|
/** 获取当前视角截图的 base64 data URL */
|
|
156
151
|
captureViewBase64(type?: string, quality?: any): string | null;
|
|
157
|
-
/** 添加右上角视图下拉菜单按钮,返回取消注册函数 */
|
|
158
|
-
addViewDropdownButton(config: EngineViewDropdownButtonConfig): () => void;
|
|
159
|
-
/** 移除右上角视图下拉菜单按钮 */
|
|
160
|
-
removeViewDropdownButton(key: string): void;
|
|
161
|
-
private createViewDropdown;
|
|
162
|
-
private initHelpPanel;
|
|
163
152
|
showHelpPanel(): void;
|
|
164
|
-
private createInfoButton;
|
|
165
|
-
private toggleViewDropdown;
|
|
166
|
-
private closeViewDropdown;
|
|
167
|
-
private updateViewDropdownText;
|
|
168
|
-
private getViewDropdownItems;
|
|
169
153
|
/**
|
|
170
154
|
* 订阅原始引擎事件
|
|
171
155
|
* 用于需要访问底层引擎事件的场景(如测量回调、剖切移动等)
|
|
@@ -61,6 +61,7 @@ export declare class Engine720 implements IBimComponent {
|
|
|
61
61
|
* @param _options 加载选项(预留)
|
|
62
62
|
*/
|
|
63
63
|
loadPanorama(url: string, _options?: PanoramaLoadOptions): Promise<void>;
|
|
64
|
+
loadModelByViewToken(viewToken: string): Promise<void>;
|
|
64
65
|
/**
|
|
65
66
|
* 预加载多个全景图
|
|
66
67
|
* @param urls 全景图 URL 列表
|
|
@@ -24,6 +24,7 @@ export declare class EngineGaussian implements IBimComponent {
|
|
|
24
24
|
init(): void;
|
|
25
25
|
isInitialized(): boolean;
|
|
26
26
|
loadModel(url: string, options?: GaussianLoadOptions): Promise<GaussianSceneInfo | null>;
|
|
27
|
+
loadModelByViewToken(viewToken: string): Promise<GaussianSceneInfo | null>;
|
|
27
28
|
unloadModel(id: string): Promise<void>;
|
|
28
29
|
clearModels(): Promise<void>;
|
|
29
30
|
setOrientationPreset(preset: GaussianOrientationPreset): void;
|
|
@@ -86,6 +86,7 @@ export declare class EngineGis implements IBimComponent {
|
|
|
86
86
|
private initViewDropdown;
|
|
87
87
|
/** 加载 GIS 3D Tiles 模型,对外只接收业务必要参数,其余显示/精度参数按文档默认值内部补齐 */
|
|
88
88
|
load3DTiles(options: EngineGis3DTilesLoadOptions): Promise<EngineGisLoaded3DTilesModel | null>;
|
|
89
|
+
loadModelByViewToken(viewToken: string): Promise<EngineGisLoaded3DTilesModel | null>;
|
|
89
90
|
/** 获取当前已加载 3D Tiles 模型的校验编辑数据 */
|
|
90
91
|
getModelCalibrationItems(): GisModelCalibrationItem[];
|
|
91
92
|
/** 使用 ENU 偏移和旋转校验 GIS 3D Tiles 模型 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewDropdownOptions } from './types';
|
|
1
|
+
import { ViewDropdownItem, ViewDropdownOptions } from './types';
|
|
2
2
|
export type { ViewDropdownItem, ViewDropdownOptions } from './types';
|
|
3
3
|
export declare class ViewDropdown {
|
|
4
4
|
private readonly options;
|
|
@@ -9,8 +9,10 @@ export declare class ViewDropdown {
|
|
|
9
9
|
constructor(options: ViewDropdownOptions);
|
|
10
10
|
init(): void;
|
|
11
11
|
destroy(): void;
|
|
12
|
+
setItems(items: ViewDropdownItem[]): void;
|
|
12
13
|
private toggleMenu;
|
|
13
14
|
private openMenu;
|
|
14
15
|
private closeMenu;
|
|
15
16
|
private updateText;
|
|
17
|
+
private resolveLabel;
|
|
16
18
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export interface ViewDropdownItem {
|
|
2
2
|
key: string;
|
|
3
|
-
labelKey
|
|
4
|
-
|
|
3
|
+
labelKey?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
action: (event: MouseEvent) => void;
|
|
6
|
+
closeOnClick?: boolean;
|
|
5
7
|
}
|
|
6
8
|
export interface ViewDropdownOptions {
|
|
7
9
|
container: HTMLElement;
|
|
@@ -26,6 +26,8 @@ import { ComponentTreeDrawerManager } from '../managers/component-tree-drawer-ma
|
|
|
26
26
|
import { Engine2dManager } from '../managers/engine-2d-manager';
|
|
27
27
|
import { EngineGisManager } from '../managers/engine-gis-manager';
|
|
28
28
|
import { EngineGaussianManager } from '../managers/engine-gaussian-manager';
|
|
29
|
+
import { ViewDropdownManager } from '../managers/view-dropdown-manager';
|
|
30
|
+
import { HelpPanelManager } from '../managers/help-panel-manager';
|
|
29
31
|
/**
|
|
30
32
|
* Manager 注册表 - 实例模式
|
|
31
33
|
* 每个 BimEngine 创建独立的 Registry 实例,替代旧的全局单例
|
|
@@ -37,6 +39,8 @@ export declare class ManagerRegistry {
|
|
|
37
39
|
container: HTMLElement | null;
|
|
38
40
|
/** 包装容器元素 */
|
|
39
41
|
wrapper: HTMLElement | null;
|
|
42
|
+
/** 当前 UI 模式,移动端用来跳过桌面端内置 UI。 */
|
|
43
|
+
mode: 'desktop' | 'mobile';
|
|
40
44
|
/** 工具栏管理器 */
|
|
41
45
|
toolbar: ToolbarManager | null;
|
|
42
46
|
/** 对话框管理器 */
|
|
@@ -77,6 +81,10 @@ export declare class ManagerRegistry {
|
|
|
77
81
|
setting: SettingDialogManager | null;
|
|
78
82
|
/** 径向工具栏管理器 */
|
|
79
83
|
radialToolbar: RadialToolbarManager | null;
|
|
84
|
+
/** 右上角视图下拉菜单管理器 */
|
|
85
|
+
viewDropdown: ViewDropdownManager | null;
|
|
86
|
+
/** 左下角帮助信息面板管理器 */
|
|
87
|
+
helpPanel: HelpPanelManager | null;
|
|
80
88
|
bottomDock: BottomDockManager | null;
|
|
81
89
|
measureDock: MeasureDockManager | null;
|
|
82
90
|
sectionDock: SectionDockManager | null;
|
package/dist/cus-bim-engine.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ export declare class CusBimEngine {
|
|
|
67
67
|
getLocale(): LocaleType;
|
|
68
68
|
setTheme(theme: 'dark' | 'light'): void;
|
|
69
69
|
setCustomTheme(theme: ThemeConfig): void;
|
|
70
|
+
initialize(options?: Omit<EngineOptions, 'container'>): Promise<boolean>;
|
|
71
|
+
loadModel(urls: string[], options?: ModelLoadOptions): void;
|
|
72
|
+
loadModelByViewToken(viewToken: string): Promise<void>;
|
|
70
73
|
private init;
|
|
71
74
|
private updateTheme;
|
|
72
75
|
private updateClientSizeDisplay;
|