feat(viewport): v1.0 B2 — 拾取 + 选中描边跨引擎#40
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… editor camera Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ial options object Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ay comment - Assert highlight layer contains mesh before deletion and is cleared after - Fix comment to explain that replay re-attaches highlight to rebuilt mesh instances (not for cleaning stale meshes — that's auto-done by dispose) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…eNodes (B2 minimal convergence)
…since B2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
BabylonAdapter.pickAt:scene.pick+metadata.nodeId父链上溯(A1 已埋标记,无新增 tagging);构造时建默认编辑器相机(镜像 ThreeAdapter defaultCamera [4,3,4]→origin/fov 50°——scene.pick需要 activeCamera,且这是 conformance 拾取对等的基础;BabylonRenderHost 的 ArcRotate 在 mount 时照旧接管)。options.makePickAdapter(Three:setViewportSize(800,600);Babylon: 定尺寸 NullEngine),中心命中 / 角落天空 null / 移除后 null ×2 引擎。IRenderHost.setSelection(node_id)+BabylonRenderHost用HighlightLayer(#3b82f6 对齐 Three OutlinePass)实现;幂等(removeAllMeshes + re-add,覆盖 group/prefab 多网格);NullEngine 下可测(无降级路径)。BabylonViewport点选接线:PR fix(viewport): drag-then-release no longer hijacks selection onto the grid #8 click-vs-drag guard(5px)→ pickAt → setSelectedNodeId(空白清选);useUIStore订阅 →host.setSelection;applyDiff 后重放高亮(同 id 移除+重建时把高亮重新挂到新 mesh 实例——旧实例的清理 HighlightLayer 自身经 onDisposeObservable 完成)。diffAndApply内联 BFS 迁diffSceneNodes(净 -17 行;removed 分支 gizmo detach/outline 清空逐字保留);拾取/描边/gizmo/snap 不动——B3 抽ThreeRenderHost时一起收。isEngineEditingCapable);gizmo pill/play/F/拖拽门不变,isEngineEditingCapable注释同步更新。Why
design/framework/architecture.md§7 v1.0(多运行时适配器)docs/superpowers/specs/2026-06-11-v1.0b2-pick-outline-design.md· Plan:docs/superpowers/plans/2026-06-11-v1.0b2-pick-outline.mdHow to test
pnpm lint && pnpm typecheck && pnpm test(564 tests:conformance 拾取对等 ×2 引擎 + adapter/render-host/BabylonViewport 新用例)pnpm tauri dev视觉 smoke:已跑 headless 视觉 smoke(vite + headless Chrome CDP,B1 同款手法):上述各项全过,console 全程零 error。最终整体审查(含「真视口里 scene.pick 用 ArcRotate 相机、转相机后拾取仍正确」的关键集成验证)结论可合并。
🤖 Generated with Claude Code