feat: 优化测量功能架构与引擎组件

- 重构测量激活逻辑,在 Engine 组件中添加统一的 activateMeasure(mode) 方法
- 简化 MeasureDialogManager,移除冗余的 handleMeasureTypeChange 方法
- 添加 EngineManager.activateMeasure 转发方法
- 修复 loadModel 错误,正确调用 Engine 组件方法
- 为 Engine 组件设置固定背景渐变色
- MeasurePanel 初始化时触发 onModeChange 回调
- 添加 MeasureMode 共享类型定义

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yuding
2026-01-15 14:13:13 +08:00
parent cd1f8186d0
commit f6257f5162
101 changed files with 31269 additions and 29937 deletions

View File

@@ -199,7 +199,7 @@
const Engine = window.LyzBimEngineSDK.BimEngine;
try {
engine = new Engine('app', { locale: 'zh-CN' });
// initEngine3D();
initEngine3D();
console.log('Engine initialized:', engine);
} catch (err) {
console.error('Init failed:', err);
@@ -354,6 +354,7 @@
engine3DInitialized = true;
updateEngineStatus('已初始化');
console.log('✅ 3D 引擎初始化成功');
loadModel();
} else {
updateEngineStatus('初始化失败');
console.error('❌ 3D 引擎初始化失败');
@@ -380,7 +381,7 @@
try {
// 加载模型文件(从 model 目录)
const modelUrl = './model/gujianzhu.glb';
const modelUrl = './model/test2';
engine.engine.loadModel(modelUrl, {
position: [0, 0, 0], // 初始位置
@@ -425,4 +426,4 @@
</script>
</body>
</html>
</html>