feat: upgrade to v1.3.2 with settings panel overhaul, clear height enhancements and bug fixes

- Overhaul settings dialog: add edge line toggle, contrast/saturation/light intensity sliders, environment and ground type selectors
- Add clear height measurement options: direction (up/down) and select type (point/element) with radio button UI
- Fix right-click context menu triggering during model drag rotation (add move threshold)
- Fix measure dialog event listener leak (on → off for cleanup)
- Update mini map API to use engine.minMap.toggle()
- Replace text-based measure icons with proper SVG assets (净高/净距/坐标/面积)
- Add i18n keys for all new settings and clear height options (zh-CN / en-US)
- Bump iflow-engine-base dependency to ^2.0.5
- Rebuild dist and sync demo libs
This commit is contained in:
yuding
2026-03-04 16:40:35 +08:00
parent 0ccc891d7c
commit c3bd82c03a
22 changed files with 15047 additions and 11698 deletions

View File

@@ -5,7 +5,7 @@
import { Engine, type EngineOptions, type ModelLoadOptions, type EngineInfo } from '../components/engine';
import { BaseManager } from '../core/base-manager';
import { RightKeyManager } from './right-key-manager';
import type { MeasureMode } from '../types/measure';
import type { MeasureMode, ClearHeightDirection, ClearHeightSelectType } from '../types/measure';
import type { MeasureUnit, MeasurePrecision } from '../components/measure-panel/types';
import type { SectionBoxRange } from '../components/section-box-panel/types';
import type { MenuItemConfig } from '../components/menu/item';
@@ -329,6 +329,28 @@ export class EngineManager extends BaseManager {
this.engineInstance.saveMeasureSetting(setting);
}
/**
* 设置净高测量朝向
* @param direction 0=朝下1=朝上
*/
public setClearHeightDirection(direction: ClearHeightDirection): void {
if (!this.engineInstance) {
return;
}
this.engineInstance.setClearHeightDirection(direction);
}
/**
* 设置净高测量选择对象类型
* @param selectType 'point'=选择点,'element'=选择构件
*/
public setClearHeightSelectType(selectType: ClearHeightSelectType): void {
if (!this.engineInstance) {
return;
}
this.engineInstance.setClearHeightSelectType(selectType);
}
public activeSection(mode: 'x' | 'y' | 'z' | 'box' | 'face'): void {
if (!this.engineInstance) {
console.warn('[EngineManager] 3D Engine not initialized.');
@@ -467,6 +489,14 @@ export class EngineManager extends BaseManager {
this.engineInstance?.toggleMiniMap();
}
/**
* 获取小地图显示状态
* @returns true=显示false=隐藏
*/
public getMiniMapState(): boolean {
return this.engineInstance?.getMiniMapState() ?? false;
}
public isFirstPersonModeActive(): boolean {
return this.engineInstance?.isFirstPersonModeActive() ?? false;
}