Commit graph

48 commits

Author SHA1 Message Date
flash555588
90ad8760e0 feat(preview): improve conversion routing and rulers 2026-06-22 03:00:35 +08:00
flash555588
b70b0845a4 refine(three): orthographic frustum based on model span
- Replace distance-based orthographic frustum with model-span * 1.2 for consistent sizing.

- Remove unused createOrthographicCamera helper.
2026-06-20 10:48:29 +08:00
flash555588
9108041aa5 feat(three): add setWireframe, STL config, and orthographic camera
- Add setWireframe(enabled) and refactor toggleWireframe to use it.

- Apply config.stl.color and config.stl.wireframe in Three.js preview.

- Support CameraConfig.mode='orthographic' with camera switching and frustum fitting.
2026-06-20 10:29:16 +08:00
flash555588
5226d7ed47 feat(ui): remove reset-parts toolbar button
- Delete the reset disassembled parts button from the inline preview toolbar.

- Remove unused reset-parts i18n keys and verify:obsidian step.
2026-06-20 10:00:11 +08:00
flash555588
a9f793e38f revert(ui): restore inline secondary expansion (first version layout)
- Replace the dropdown menu with the original left/right inline expansion of secondary actions.

- Keep icon-only primary buttons and grouped toolbar layout.
2026-06-20 03:16:33 +08:00
flash555588
c053fcf18d fix(ui): use single global listener for helper dropdown
- Replace per-preview document click/keydown listeners with a single global listener to avoid performance issues with many previews.

- Refactor dropdown open/close to read state from DOM and close other menus when opening.

- Update verify:obsidian to open the dropdown before clicking reset-parts.
2026-06-20 03:11:56 +08:00
flash555588
f04ca3d308 feat(ui): replace inline secondary expansion with dropdown menu
- Move all secondary actions into a theme-styled dropdown menu triggered by the "more" button.

- Keep primary icon buttons on the toolbar: reset, wireframe, axes, bbox, focus, disassemble, measure, annotate, copy.

- Add menu sections with separators and full descriptive labels.

- Support Escape and outside-click to close the menu.

- Remove old inline .show-secondary expansion CSS.
2026-06-20 02:45:03 +08:00
flash555588
bf61fb4ebc revert(ui): remove toolbar text labels, keep grouped secondary collapse
- Remove icon+text labels from all helper toolbar buttons; keep icon-only primary actions visible.

- Preserve global secondary-button collapse behind the "more" toggle.

- Drop now-unused short-label i18n keys and labeled-button CSS.
2026-06-20 02:14:56 +08:00
flash555588
d10ed96013 feat(ui): re-layout helper toolbar with labels and secondary collapse
- Promote reset, wireframe, axes, bounding box, focus, disassemble, measure, annotate, and copy snapshot to primary icon+text buttons.

- Collapse all secondary buttons behind a global "more" toggle by default.

- Add short-label i18n keys and tighten labeled-button CSS sizing.

- Update preview verification harness to expand the more menu for secondary actions.
2026-06-20 02:06:21 +08:00
flash555588
5dca9ecb71 feat(inline): labeled primary measurement button and style
- Make the measurement tool a primary inline toolbar button with a visible text label ("测距" / "Measure").

- Add .ai3d-inline-btn--labeled styles for icon+text layout and compact sizing.

- Verified with typecheck, lint, unit tests, preview harness, and Obsidian vault install.
2026-06-20 01:15:11 +08:00
flash555588
6b98a67dd5 feat(ui): promote measurement button to primary toolbar 2026-06-20 00:33:18 +08:00
flash555588
3915ff4d86 fix(annotations): reduce label jitter during camera rotation 2026-06-19 22:37:10 +08:00
flash555588
7eaa4f7b21 fix(annotations): disable label avoidance during camera motion to prevent jitter 2026-06-19 22:16:25 +08:00
flash555588
312d641430 fix(preview): replace Obsidian-only appendText with standard DOM API 2026-06-19 21:33:15 +08:00
flash555588
0f8aa7c2d6 refactor(P2): complete PluginStore actions and migrate knowledge-note 2026-06-19 20:59:17 +08:00
flash555588
5752738b9c chore(build): regenerate main.js after P2-5 2026-06-17 22:02:25 +08:00
flash555588
b43b5f0803 refactor(P2): extract heading-pin observer into view module 2026-06-15 17:16:54 +08:00
flash555588
8a0fb38057 refactor(P2): split settings display() into section builders 2026-06-15 17:09:02 +08:00
flash555588
69ac33d719 chore(P2): normalize line endings, add .editorconfig, run lint in CI, sync docs 2026-06-15 17:01:17 +08:00
flash555588
83251a78bd chore(build): regenerate main.js after P1 fixes 2026-06-15 16:32:51 +08:00
flash555588
f4870a3a61 chore(build): regenerate main.js after P0 fixes 2026-06-15 12:21:01 +08:00
flash555588
7a00adc141 fix(verify): update direct workbench verification logic 2026-06-08 13:21:37 +08:00
flash555588
25ad86752f fix: address Obsidian review warnings
- Replace activeWindow.requestAnimationFrame with window.requestAnimationFrame

  in Babylon scene for popout window compatibility

- Replace bare requestAnimationFrame with window.requestAnimationFrame

  in Three scene for popout window compatibility

- Replace document.addEventListener/removeEventListener with activeDocument

  in direct-view resize handles for popout window compatibility

- Add explicit unknown type to userData?.name to avoid implicit any
2026-06-06 22:24:47 +08:00
flash555588
d5a6434e3b feat: add interruption notice when model load is superseded
When a newer model load request comes in while an older one is still

in progress, show an Obsidian Notice instead of silently dropping

the stale work. This gives users feedback when they quickly switch

between model files and the previous load gets cancelled.

- Add 'directWorkbench.modelLoadInterrupted' translation key in EN/ZH

- Show Notice at both stale-generation checkpoints in loadModel

- Keep the existing preview.destroy() cleanup on the post-render path
2026-06-06 22:00:28 +08:00
flash555588
4c0c4800dd fix: invert vertical resize handle direction
Dragging the bottom resize handle down now shrinks the bottom panel

(consistent with the horizontal handle and standard split-pane behavior).

Dragging up expands the panel.
2026-06-06 21:53:29 +08:00
flash555588
c078c22b0e feat: move knowledge and matches to sidebar
- Remove the 5 icon buttons from the right sidebar (focus, disassembly,

  reset, generate-note, open-index)

- Move knowledge controls (generate-note, open-note, open-index) to sidebar

- Move registered part matches to sidebar

- Bottom panel now only shows overview: backend, route, metrics

- Sidebar renders content vertically with full workbench card styling

- Mobile: sidebar content scrolls horizontally

This puts actionable information on the right and model status

on the bottom, reducing visual clutter in both areas.
2026-06-06 21:50:24 +08:00
flash555588
355c2e1eb4 feat: workspace layout with sidebar and resize handles
Add a track-based workspace framework around the original workbench panel:

- Main preview area + right sidebar with action icons (focus, disassembly,

  reset, generate-note, open-index)

- Draggable resize handles for sidebar width and bottom panel height

- Keep the original bottom workbench panel design: overview on the left,

  knowledge actions and registered part matches on the right

- Mobile responsive: sidebar becomes a horizontal scrollable row

This keeps the familiar two-column workbench panel while adding

a proper resizable workspace frame so the preview area is no longer

squeezed by the panel.
2026-06-06 21:37:50 +08:00
flash555588
e8d094afb5 feat: workspace track layout with draggable resize handles and bottom tabs
- Replace the legacy bottom workbench panel with a track-based workspace layout

- Main preview area gets full remaining space without being squeezed by the panel

- Right sidebar with icon buttons for focus/disassembly/reset/annotation/generate-note/open-index

- Draggable resize handles for sidebar width and bottom panel height (like IDE split panes)

- Bottom panel organized into Overview/Matches/Knowledge tabs to reduce visual clutter

- Mobile responsive: sidebar becomes a horizontal row on narrow screens

- Add tab translation keys for Overview/Matches/Knowledge in both EN and ZH

- Clean up legacy workbench panel CSS and consolidate into workspace styles
2026-06-06 21:22:01 +08:00
flash555588
b1cf45b11e feat: register cross-format model components 2026-06-06 20:36:51 +08:00
flash555588
e478b426d7 feat: register glb component parts 2026-06-06 19:27:28 +08:00
flash555588
fd491042c1 Release 0.4.3 2026-06-03 20:51:30 +08:00
flash555588
e3bdfba358 release: prepare 0.4.0 2026-06-01 22:33:25 +08:00
flash555588
8463173d5d release: prepare 0.3.1 2026-05-30 14:07:55 +08:00
flash555588
9b2079343f release: prepare 0.3.0 2026-05-29 23:51:40 +08:00
flash555588
16a06bfb43 release: prepare 0.2.3 2026-05-29 16:33:42 +08:00
flash555588
768d7d027a Improve preview focus, disassembly, and toolbar behavior 2026-05-27 11:15:26 +08:00
flash555588
c87d7ea5cd release: simplify model view and publish 0.2.1 2026-05-25 20:42:41 +08:00
flash555588
287a81b1fb style: unify design tokens, consolidate duplicate CSS, clean inline SVGs
- Add comprehensive CSS custom property token system (radius, spacing, colors)
- Remove duplicate .ai3d-workbench definition (merged into base)
- Use tokens for stage-shell and section border-radius
- Rename duplicate @keyframes (ai3d-fade-in, ai3d-annot-pulse) to unique names
- Remove hardcoded SVG width/height from annotation action buttons
2026-05-22 02:34:03 +08:00
flash555588
dfdbeaa1a3 fix: preserve explode slider state across re-renders, use ref check
- Hoist explodeAxis/explodeValue outside renderPanels to survive re-renders
- Restore slider value and active axis button from persisted state
- Replace JSON.stringify profile diff with reference comparison
2026-05-22 02:20:05 +08:00
flash555588
968b3e8626 perf: vector dedup, icon SVG cache, knowledge note re-entry guard
- Compute line-of-sight distance from existing delta instead of re-subtracting
- Cache icon SVG innerHTML to avoid repeated setIcon calls across renders
- Block duplicate generateKnowledgeNote calls instead of serializing them
2026-05-22 02:10:01 +08:00
flash555588
409df1620f perf: event delegation, OBJ texture cache, syncCapabilities guard
- Replace 44 querySelectorAll scans with single delegated click handler
- Cache resolved texture data URLs in loadThreeOBJ
- Skip syncCapabilities when preview reference unchanged
2026-05-22 01:47:29 +08:00
flash555588
f952415449 feat: add Three.js/Babylon.js renderer toggle in settings
- Add useThreeRenderer boolean setting (default: true)
- Toggle forces all single-model previews to Babylon.js when off
- Pass setting through all preview creation paths
- Add i18n strings for en and zh-CN
2026-05-21 21:49:10 +08:00
flash555588
be3db73d9b feat: Three.js as primary renderer for all single-model formats and workbench
- Add renderer-agnostic preview abstraction layer (src/render/preview/)
- Add Three.js renderer with GLB/GLTF/STL/PLY/OBJ support (src/render/three/)
- Add Three.js disassembly, explode, focusWorldPoint, animation support
- Route workbench to Three.js for supported formats (allowEditModeOnThree)
- Fix htm multi-root template rendering with replaceWithHtml helper
- Fix profile null-safety with getProfileTags/getProfileAnnotations
- Fix AnalysisView double-mount with pre-cleanup in onOpen
- Move presets from babylon/presets/ to renderer-agnostic presets/
- Update routing matrix, README, i18n for expanded format support
2026-05-21 20:25:39 +08:00
flash555588
5a86cc13bf release: 0.2.0 2026-05-13 20:00:57 +08:00
flash555588
242f364698 Harden Babylon release bundle and document SPLAT status 2026-05-13 18:22:27 +08:00
flash555588
78060d324c fix: satisfy Obsidian review lint 2026-05-13 10:34:55 +08:00
flash555588
db77c003ec feat: require manual converter setup 2026-05-13 02:23:21 +08:00
flash555588
c0629c7d17 fix: prepare 0.1.5 release 2026-05-13 02:03:30 +08:00