feat: 新增底部Dock测量面板与回调联动

This commit is contained in:
yuding
2026-03-30 10:53:39 +08:00
parent c11140f967
commit 2574a11284
42 changed files with 18388 additions and 11404 deletions

View File

@@ -221,17 +221,49 @@ export const enUS: TranslationDictionary = {
},
setting: {
dialogTitle: 'Settings',
presetSelect: 'Preset',
presetSelectPlaceholder: 'Select preset',
defaultPresetLabel: 'Default Preset',
savePreset: 'Save Preset',
deletePreset: 'Delete',
deletePresetForbidden: 'Default preset cannot be deleted',
presetDefaultName: 'Preset',
presetNamePrompt: 'Enter preset name',
presetNameRequired: 'Preset name is required',
presetNameDuplicate: 'Preset name already exists',
restorePreset: 'Restore Preset',
saveAsNewPreset: 'Save As Preset',
selectPresetFirst: 'Please select a preset first',
presetButton: 'Preset',
undoChanges: 'Undo Changes',
saveAsDialogTitle: 'Save As Preset',
deleteDialogTitle: 'Delete Preset',
deleteDialogMessage: 'Delete current preset? This action cannot be undone.',
presetNamePlaceholder: 'Enter preset name',
confirm: 'Confirm',
cancel: 'Cancel',
presetPickPrompt: 'Please input preset number',
presetPickInvalid: 'Invalid preset number',
renderMode: 'Render Mode',
modes: {
simple: 'Performance',
balance: 'Balanced',
advanced: 'Quality',
},
displaySection: 'Display',
edgeLine: 'Edge Lines',
edgeOpacity: 'Edge Opacity',
showGrid: 'Show Grid',
showLevel: 'Show Level',
contrast: 'Contrast',
saturation: 'Saturation',
lightIntensity: 'Light Intensity',
environment: 'Environment',
environmentType: {
none: 'None',
hdr: 'HDR',
sky: 'Sky',
},
backgroundVisible: 'Show Background',
ground: 'Ground',
groundElevation: 'Ground Elevation',

View File

@@ -242,6 +242,29 @@ export interface TranslationDictionary {
};
setting: {
dialogTitle: string;
presetSelect: string;
presetSelectPlaceholder: string;
defaultPresetLabel: string;
savePreset: string;
deletePreset: string;
deleteDialogTitle: string;
deleteDialogMessage: string;
deletePresetForbidden: string;
presetDefaultName: string;
presetNamePrompt: string;
presetNameRequired: string;
presetNameDuplicate: string;
restorePreset: string;
saveAsNewPreset: string;
selectPresetFirst: string;
presetButton: string;
undoChanges: string;
saveAsDialogTitle: string;
presetNamePlaceholder: string;
confirm: string;
cancel: string;
presetPickPrompt: string;
presetPickInvalid: string;
/** 渲染模式 */
renderMode: string;
modes: {
@@ -251,6 +274,9 @@ export interface TranslationDictionary {
};
/** 边线 */
edgeLine: string;
edgeOpacity: string;
showGrid: string;
showLevel: string;
/** 对比度 */
contrast: string;
/** 饱和度 */
@@ -263,14 +289,20 @@ export interface TranslationDictionary {
backgroundVisible: string;
/** 显示地面 */
ground: string;
displaySection: string;
/** 地面高度 */
groundElevation: string;
/** 地面高度单位 */
groundElevationUnit: string;
environmentType: {
none: string;
hdr: string;
sky: string;
};
};
}
/**
* 语言<E8AFAD><E8A880>码类型
*/
export type LocaleType = 'zh-CN' | 'en-US';
export type LocaleType = 'zh-CN' | 'en-US' | 'zh-TW';

View File

@@ -1,4 +1,4 @@
import {TranslationDictionary} from './types';
import { TranslationDictionary } from './types';
export const zhCN: TranslationDictionary = {
common: {
@@ -221,17 +221,49 @@ export const zhCN: TranslationDictionary = {
},
setting: {
dialogTitle: '设置',
presetSelect: '选择预设',
presetSelectPlaceholder: '请选择预设',
defaultPresetLabel: '默认预设',
savePreset: '保存预设',
deletePreset: '删除预设',
deletePresetForbidden: '默认预设不允许删除',
presetDefaultName: '预设',
presetNamePrompt: '请输入预设名称',
presetNameRequired: '预设名称不能为空',
presetNameDuplicate: '预设名称已存在,请使用其他名称',
restorePreset: '恢复预设',
saveAsNewPreset: '存为新预设',
selectPresetFirst: '请先选择预设',
presetButton: '预设',
undoChanges: '撤销修改',
saveAsDialogTitle: '存为新预设',
deleteDialogTitle: '删除预设',
deleteDialogMessage: '确认删除当前预设吗?删除后不可恢复。',
presetNamePlaceholder: '请输入预设名称',
confirm: '确定',
cancel: '取消',
presetPickPrompt: '请输入预设序号',
presetPickInvalid: '预设序号无效',
renderMode: '渲染模式',
modes: {
simple: '性能模式',
balance: '平衡模式',
advanced: '效果模式',
},
displaySection: '显示设置',
edgeLine: '边线',
edgeOpacity: '边线透明度',
showGrid: '显示轴网',
showLevel: '显示标高',
contrast: '对比度',
saturation: '饱和度',
lightIntensity: '光照强度',
environment: '环境背景',
environmentType: {
none: '无',
hdr: 'HDR背景',
sky: '天空盒',
},
backgroundVisible: '显示背景',
ground: '显示地面',
groundElevation: '地面高度',

272
src/locales/zh-TW.ts Normal file
View File

@@ -0,0 +1,272 @@
import { TranslationDictionary } from './types';
export const zhTW: TranslationDictionary = {
common: {
title: 'BimEngine',
description: '這是一個使用 BIM-ENGINE。',
openTestDialog: '打開測試彈窗',
openInfoDialog: '打開資訊彈窗 (封裝版)',
},
toolbar: {
home: '首頁',
measure: '測量',
zoomBox: '選框放大',
info: '資訊',
location: '定位',
setting: '設定',
walk: '漫遊',
map: '地圖',
property: '構件詳情',
fullscreen: '全屏',
walkMenu: '漫遊選單',
walkPerson: '第一人稱',
walkBird: '第三人稱',
tree: '模型樹',
section: '剖切',
sectionPlane: '拾取面剖切',
sectionAxis: '軸向剖切',
sectionBox: '剖切盒',
cameraSwitch: '相機切換',
},
dialog: {
testTitle: '測試彈窗',
testContent: '<div style="padding: 10px;">這是一個 <b>可拖曳</b> 且 <b>可縮放</b> 的彈窗。<br><br>你可以嘗試拖動標題欄,或者拖動右下角改變大小。</div>',
},
menu: {
info: '資訊',
home: '首頁',
componentDetail: '構件詳情',
hideSelected: '隱藏選中構件',
transparentSelected: '半透明選中構件',
cancelTranslucent: '取消半透明',
isolateSelected: '隔離選中構件',
hideOthers: '其他構件隱藏',
transparentOthers: '其他構件半透明',
fitSectionBox: '剖切盒適應',
showAll: '顯示全部',
quickSelect: '快速選擇',
selectSameType: '選擇同類模型',
selectSameLevel: '選擇同層模型',
selectSameLevelType: '選擇同層同類模型'
},
tree: {
searchPlaceholder: '請輸入要搜尋的內容',
},
constructTree: {
title: '目錄樹',
},
tab: {
component: '構件',
system: '系統',
space: '空間',
type: '類型',
major: '專業',
},
panel: {
property: {
title: '構件詳情',
base: '基本屬性',
material: '材質資訊',
advanced: '進階設定',
tab: {
props: '屬性',
material: '材質'
}
},
componentDetail: {
title: '構件詳情',
noSelection: '請先選中構件'
}
},
measure: {
btnName: '測量',
dialogTitle: '測量',
modes: {
clearHeight: '淨高',
clearDistance: '淨距',
distance: '距離',
elevation: '標高',
point: '座標',
angle: '角度',
area: '面積',
slope: '坡度',
},
actions: {
expand: '展開',
collapse: '收起',
clearAll: '刪除全部',
settings: '設定',
},
labels: {
currentMode: '當前測量方式:',
x: 'X',
y: 'Y',
z: 'Z',
value: {
clearHeight: '淨高:',
clearDistance: '淨距:',
distance: '距離:',
elevation: '標高:',
point: '座標:',
angle: '角度:',
area: '面積:',
slope: '坡度:',
}
},
settings: {
title: '設定',
unit: '單位:',
precision: '精度:',
hint: '距離、淨距、淨高和標高預設使用該單位;角度和面積有各自預設單位。',
save: '儲存設定',
cancel: '取消',
},
clearHeight: {
direction: '朝向:',
directionDown: '朝下',
directionUp: '朝上',
selectType: '選擇對象:',
selectPoint: '選擇點',
selectElement: '選擇構件',
}
},
sectionPlane: {
dialogTitle: '拾取面剖切',
actions: {
hide: '隱藏',
reverse: '反向',
reset: '重設'
}
},
sectionAxis: {
dialogTitle: '軸向剖切',
actions: {
hide: '隱藏',
reverse: '反向',
axisX: 'X',
axisY: 'Y',
axisZ: 'Z'
}
},
sectionBox: {
dialogTitle: '剖切盒',
actions: {
hide: '隱藏',
reverse: '反向',
fitToModel: '適應',
reset: '重設'
},
axes: {
x: 'X',
y: 'Y',
z: 'Z'
}
},
walkControl: {
speed: '移動速度:',
gravity: '重力',
collision: '碰撞',
characterModel: {
label: '建築工人',
constructionWorker: '建築工人',
officeMale: '辦公室男性'
},
walkMode: {
label: '行走模式',
walk: '行走模式',
run: '奔跑模式'
},
exit: '退出',
path: {
dialogTitle: '路徑漫遊',
duration: '漫遊時間',
durationUnit: '秒',
loop: '循環播放',
addPoint: '新增漫遊點',
deleteAll: '刪除全部',
point: '漫遊點',
play: '播放漫遊',
stop: '停止漫遊',
noPoints: '暫無漫遊點,請新增'
}
},
info: {
dialogTitle: '基本資訊',
meshCount: '構件數量',
totalTriangles: '三角面數量',
totalVertices: '頂點數量',
},
aiChat: {
title: 'AI 助手',
placeholder: '輸入你的問題...',
quickPrompt: {
summarize: '總結這個模型',
explain: '解釋選中的構件',
generate: '生成報告'
},
action: {
new: '新建對話',
history: '歷史記錄',
settings: '設定',
close: '關閉'
},
helper: {
newline: 'Shift + Enter 換行',
send: 'Enter 傳送'
},
thinking: '正在思考...',
other: '其他',
otherPlaceholder: '請輸入自定義答案',
submit: '提交'
},
setting: {
dialogTitle: '設定',
presetSelect: '選擇預設',
presetSelectPlaceholder: '請選擇預設',
defaultPresetLabel: '預設預設',
savePreset: '儲存預設',
deletePreset: '刪除預設',
deletePresetForbidden: '預設預設不允許刪除',
presetDefaultName: '預設',
presetNamePrompt: '請輸入預設名稱',
presetNameRequired: '預設名稱不能為空',
presetNameDuplicate: '預設名稱已存在,請使用其他名稱',
restorePreset: '還原預設',
saveAsNewPreset: '另存為新預設',
selectPresetFirst: '請先選擇預設',
presetButton: '預設',
undoChanges: '撤銷修改',
saveAsDialogTitle: '另存為新預設',
deleteDialogTitle: '刪除預設',
deleteDialogMessage: '確認刪除目前預設嗎?刪除後無法復原。',
presetNamePlaceholder: '請輸入預設名稱',
confirm: '確定',
cancel: '取消',
presetPickPrompt: '請輸入預設序號',
presetPickInvalid: '預設序號無效',
renderMode: '渲染模式',
modes: {
simple: '效能模式',
balance: '平衡模式',
advanced: '效果模式',
},
displaySection: '顯示設定',
edgeLine: '邊線',
edgeOpacity: '邊線透明度',
showGrid: '顯示軸網',
showLevel: '顯示標高',
contrast: '對比度',
saturation: '飽和度',
lightIntensity: '光照強度',
environment: '環境背景',
environmentType: {
none: '無',
hdr: 'HDR背景',
sky: '天空盒',
},
backgroundVisible: '顯示背景',
ground: '顯示地面',
groundElevation: '地面高度',
groundElevationUnit: 'm',
}
};