Commit Graph

83 Commits

Author SHA1 Message Date
yuding
6cfe4c2f10 docs: update AI_COLLABORATION.md with architecture changes
Document ManagerRegistry instance-based pattern, singleton vs instance
service classification, core file descriptions, and multi-tab demo.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:09:30 +08:00
yuding
2159fa47e2 build: rebuild dist and sync demo libs
Rebuild ES and UMD bundles reflecting all source changes including
ManagerRegistry instance-based DI, toolbar scroll fix, and shadow removal.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:09:24 +08:00
yuding
e91a460fea feat(demo): add multi-tab demo with dual BimEngine instances
New demo page with two independent BimEngine instances side by side,
draggable divider for resizing, and proper SDK-layer resize handling.
Replaces the iframe-based approach now that ManagerRegistry is instance-based.
Removes unused panelViewer vite config entry.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:09:17 +08:00
yuding
7d7fbd9c14 fix(button-group): add horizontal scroll for bottom toolbar overflow
When container width is too small, the bottom toolbar now scrolls
horizontally. Also removes box-shadow on glass-pill sections to prevent
clipping artifacts and sets transparent background on root element.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:09:09 +08:00
yuding
2395dff81e refactor(components): accept registry in menu, engine, walk-path, button-group
Menu button factories, Engine component, WalkPathPanel, and BimButtonGroup
now accept registry via options/parameters. Engine component adds public
resize() method wrapping EngineKernel.handleWindowResize().

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:09:01 +08:00
yuding
bb1d18a4e7 refactor(toolbar): pass registry to all button factories
Toolbar component now receives registry from ButtonGroupManager options
and passes it to all 16 toolbar button factory functions.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:08:52 +08:00
yuding
eb0f52ecb5 refactor(bim-engine): create ManagerRegistry instance and inject into managers
BimEngine now instantiates its own ManagerRegistry and passes it to all
managers during initialization. Each BimEngine instance is fully isolated.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:08:42 +08:00
yuding
73edf0b3b8 refactor(managers): accept registry parameter via constructor injection
All 16 managers now receive ManagerRegistry instance through constructor
instead of calling ManagerRegistry.getInstance(). This enables each
BimEngine instance to have its own isolated set of managers.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:08:36 +08:00
yuding
963e0d6cad refactor(core): remove ManagerRegistry singleton, use instance-based DI
Replace static getInstance() pattern with public constructor to enable
multiple independent BimEngine instances on the same page. BaseManager
and BaseDialogManager now accept registry via constructor parameter.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 10:08:27 +08:00
yuding
fdc6f884aa refactor: change loadModel parameter from string to string array
- Update loadModel signature: url: string -> urls: string[]
- Update validation logic for array parameter
- Update all demo files to pass array instead of single string
2026-02-26 16:03:38 +08:00
yuding
191c571f40 refactor: sync managers and section box actions
Wire section box scale/reverse/reset to clipping APIs and sync demo artifacts.
2026-02-04 18:20:30 +08:00
yuding
b12940f49c chore: mark all tasks complete in refactor-model-operations plan 2026-02-04 15:31:41 +08:00
yuding
19c6adad91 build: update demo libs after refactoring model operations
Task 10 completed from refactor-model-operations plan.
2026-02-04 15:30:15 +08:00
yuding
8fd1870f42 refactor(engine): update Engine layer to accept models parameter
- Add getHighlightModels() to retrieve selected models
- Rename hideSelectedModels → hideModels(models)
- Rename translucentSelectedModels → translucentModels(models)
- Rename isolateSelectedModels → isolateModels(models)
- Update translucentOtherModels to accept models parameter
- Update batch select methods to accept models parameter

Tasks 1-6 completed from refactor-model-operations plan.
2026-02-04 15:29:27 +08:00
yuding
1ff331e0e0 refactor(engine): update EngineManager layer to accept models parameter
- Add getHighlightModels() to retrieve selected models
- Update hideSelectedModels → hideModels(models)
- Update translucentSelectedModels → translucentModels(models)
- Update isolateSelectedModels → isolateModels(models)
- Update translucentOtherModels to accept models parameter
- Update batch select methods to accept models parameter
- Update right-click menu handlers to use new API pattern

Tasks 7-9 completed from refactor-model-operations plan.
2026-02-04 15:28:50 +08:00
yuding
a30e87e577 docs(engine): add JSDoc comments to all public methods
Add documentation for:
- saveMeasureSetting: 保存测量设置
- fitSectionBoxToModel: 剖切盒适应选中模型
- setWalkSpeed/Gravity/Collision: 漫游参数设置
- toggleMiniMap: 切换小地图
- getTypeTreeData/LevelTreeData/MajorTreeData: 模型树数据获取
- activateZoomBox: 框选放大
- getEngineInfo: 获取引擎信息
2026-02-04 15:17:23 +08:00
yuding
ad19934e19 feat(menu): add cancel translucent option to right-click menu
- Add cancelTranslucent i18n translations (zh-CN: 取消半透明, en-US: Cancel Translucent)
- Add unTranslucentModel() method to Engine layer
- Add unTranslucentModel() proxy to EngineManager
- Add menu item after 'Transparent Selected' (order: 4)
- Update menu item order numbers (5-8)
2026-02-04 15:10:51 +08:00
yuding
89783d0a9b feat(menu): implement right-click menu functions for model operations
- Add i18n translations for quick select menu (zh-CN, en-US)
- Add 8 model operation methods to Engine layer
- Add 8 proxy methods to EngineManager layer
- Implement right-click menu handlers for hide/translucent/isolate/show all
- Add quick select submenu (same type/level/level+type)
- Replace console.log placeholders with actual API calls
2026-02-03 18:01:31 +08:00
yuding
7a1a44bb5c chore: update .gitignore and remove tracked .DS_Store 2026-02-02 18:20:22 +08:00
yuding
044cd0e034 refactor(measure): centralize measure type config and migrate API
- Add unified MEASURE_TYPES config in types/measure.ts
- Export MEASURE_MODES_ORDERED, ENGINE_TYPE_TO_MODE, MODE_TO_ENGINE_TYPE
- Refactor measure-dialog-manager to use centralized config
- Refactor measure-panel to use MEASURE_TYPES for icons/order/valueType
- Simplify engine/index.ts measureMap with dynamic key access
- Add measure settings API (saveMeasureSetting) with cache sync
- Add direct engine event listening for measure-changed and section-move
- Update i18n keys for 8 measure modes
2026-02-02 18:18:36 +08:00
yuding
316f42ae6b feat(clipping): add section-move event listener
Listen for 'section-move' event from underlying engine and emit as 'section:move'.
Currently outputs to console for debugging.

Event type: { x?: {min, max}, y?: {min, max}, z?: {min, max} }
2026-02-02 16:38:43 +08:00
yuding
4a09d52283 feat(clipping): implement hide/recover toggle for all section dialogs
Update all three section dialogs to support hide/show toggle:

SectionAxisDialogManager:
- onHideToggle now calls hideSection()/recoverSection()

SectionBoxDialogManager:
- onHideToggle now calls hideSection()/recoverSection()

SectionPlanePanel:
- Add isHidden state tracking
- Change onHide to onHideToggle(isHidden)
- Add setHiddenState/getHiddenState methods
- Update button to toggle active state

SectionPlaneDialogManager:
- Switch to onHideToggle callback
- Call hideSection()/recoverSection() based on toggle state

Behavior: Click hide button to hide section, click again to recover.
2026-02-02 16:36:17 +08:00
yuding
41abd9ed67 feat(clipping): add hideSection and recoverSection methods
Add new methods for temporary section plane visibility control:
- hideSection(): Hide section plane temporarily (calls engine.clipping.disabled())
- recoverSection(): Recover hidden section plane (calls engine.clipping.recover())

Update SectionPlaneDialogManager to use hideSection() instead of direct API call.
2026-02-02 16:32:22 +08:00
yuding
6db24d23bb docs(code): add JSDoc comments for clipping API methods
Add comprehensive documentation for:
- activeSection(mode): Unified activation API with mode descriptions
- getCurrentSectionMode(): Current mode getter
- setSectionBoxRange(range): Box range setter with percentage format
- deactivateSection(): Unified deactivation

Includes @param, @returns, @remarks, and @example sections in Chinese.
2026-02-02 16:30:07 +08:00
yuding
5e02ebb8e9 docs: update clipping API documentation
- Update method references: activateSectionAxis → activeSection
- Update call chains for all clipping modes (x/y/z/box/face)
- Document new unified API: engine.clipping.active(mode)
- Mark deprecated methods: fitSectionBoxToModel, resetSectionBox
- Update underlying API: updateClippingValue instead of setboxPercent
2026-02-02 16:25:36 +08:00
yuding
679d792de2 refactor(section-managers): adapt to unified clipping API
SectionAxisDialogManager:
- Update activateSectionAxis → activeSection in callbacks

SectionBoxDialogManager:
- Update activateSectionBox → activeSection('box')
- Disable fitSectionBoxToModel and resetSectionBox (not supported)

SectionPlaneDialogManager:
- Add activeSection('face') to onDialogCreated
- Add deactivateSection() to onBeforeDestroy
- Wire onHide to engine.clipping.disabled()
- Keep onReverse/onReset as log-only (not supported)
2026-02-02 16:25:32 +08:00
yuding
b36cc3edf3 refactor(engine-manager): update clipping API to unified activeSection
- Add activeSection(mode) method
- Add getCurrentSectionMode() method
- Remove deprecated methods: activateSectionAxis, activateSectionBox, etc.
- Keep deactivateSection() and setSectionBoxRange()
- Code reduction: ~78 lines → ~27 lines (65% reduction)
2026-02-02 16:25:27 +08:00
yuding
76da6cf3ac refactor(engine): migrate clipping to unified activeSection API
- Replace old state variables with currentSectionMode
- Implement unified activeSection(mode) for all clipping types (x/y/z/box/face)
- Remove deprecated methods: activateSectionAxis, activateSectionBox, etc.
- Use new underlying API: engine.clipping.active(mode)
- Code reduction: ~175 lines → ~38 lines (78% reduction)
2026-02-02 16:25:24 +08:00
yuding
91daabae9d chore(demo): 更新 ESM 构建产物 2026-02-02 10:23:04 +08:00
yuding
bc86631705 chore(demo): 更新 UMD 构建产物 2026-02-02 10:23:04 +08:00
你的用户名
45d3035d8a 引入css 2026-01-29 17:03:25 +08:00
yuding
0b8dcd36fa feat(tree,menu,docs): 对接目录树三类数据并中文化文档 2026-01-28 17:19:36 +08:00
yuding
3ab9d4b0ea style(collapse): 深色模式下使用更深的边框颜色 border-strong 2026-01-28 16:07:49 +08:00
yuding
bf4d4ff3c9 style(collapse): 使用更深的边框颜色 border-default 2026-01-28 16:06:01 +08:00
yuding
ff0ca20e96 style(collapse): 为 ghost 模式表头添加下边框分隔
- 添加 border-bottom: 1px solid var(--bim-border-subtle)
- 修复 setTheme 中的 CSS 变量命名,使用标准名称
- 折叠的多个面板现在有明显的视觉分隔
2026-01-28 16:03:07 +08:00
yuding
c66e34422f fix(collapse): 添加缺失的 CSS 变量 --bim-component-bg-hover
- BimCollapse.setTheme() 现在设置标准的 component 变量
- 修复 ghost 模式下背景色无法显示的问题
- 添加 --bim-component-bg, --bim-component-bg-hover, --bim-component-bg-active
2026-01-28 15:57:47 +08:00
yuding
b884109b9e refactor(component-detail): 移除 PropertyPanelManager,统一使用 ComponentDetailManager
- 删除 PropertyPanelManager 文件(移至 .recycle/2026-01-28/)
- 修改 Toolbar 按钮调用 componentDetail.show() 而非 propertyPanel.show()
- 修复折叠面板 ghost 模式样式:添加背景色和左边距
- 清理 BimEngine 和 ManagerRegistry 中的 PropertyPanelManager 引用
- 构建验证通过
2026-01-28 15:46:01 +08:00
yuding
a61c7f45d1 feat(i18n): 添加构件详情和显示全部的国际化文本 2026-01-28 12:02:14 +08:00
yuding
89789e003b feat(registry): 注册 ComponentDetailManager 到全局 Registry 和 BimEngine 2026-01-28 12:00:55 +08:00
yuding
33f1c72791 feat: 新增构件详情弹窗管理器 2026-01-28 11:58:16 +08:00
yuding
e75886d671 feat(engine-manager): 添加构件选中方法和动态右键菜单 2026-01-28 11:57:20 +08:00
yuding
cf20389a30 feat(engine): 监听构件点击事件并记录选中状态 2026-01-28 11:55:57 +08:00
yuding
369d754ea2 docs: 更新漫游功能调用链文档 2026-01-28 11:24:35 +08:00
yuding
1c66b48b28 feat(walk-control): 对接漫游功能到底层 API 2026-01-28 11:24:33 +08:00
yuding
dc63f94e44 feat(engine-manager): 暴露漫游功能方法 2026-01-28 11:24:32 +08:00
yuding
0e38f58052 feat(engine): 新增漫游功能方法 2026-01-28 11:24:31 +08:00
yuding
283410fd7d feat(section-axis): integrate dialog manager with engine methods 2026-01-27 17:59:52 +08:00
yuding
5e62c8fdc3 feat(engine): add section axis clipping methods 2026-01-27 17:58:56 +08:00
yuding
8786c41f02 chore: release v1.0.6 2026-01-23 16:28:32 +08:00
yuding
89ae01ffd7 feat: upgrade iflow-engine-base to v1.0.5, add pause/resume rendering API
- Update iflow-engine-base from 1.0.1 to 1.0.5
- Change default engine version from v1 to v2
- Add pauseRendering() and resumeRendering() methods
- Add switch model feature in demos
- Update model URLs in demos
- Add new documentation files
2026-01-23 16:27:04 +08:00