feat(viewport): v1.0 B3b — Babylon gizmo + snap 跨引擎#41
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… shared by hosts)
…nable Babylon gizmo)
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.
摘要
让 Babylon 模式可拖动(T/R/S gizmo + 平面拖拽)+ grid/node/socket 三层吸附,与 Three 跨引擎对等。实现 B3a 定义的
IRenderHostgizmo+snap 契约。BabylonRenderHost用GizmoManager(usePointerToAttachGizmos=false,onDragStart/Drag/End 映射拖拽生命周期;WeakSet 幂等挂 observer 防累积;planarGizmoEnabled平面手柄对齐 Three)babylon/snap-features.ts(OBB 15 点 +Vector3.Project,15 点顺序与 Three 一致)+babylon/transform-util.ts(四元数归一)computeSnapOffset/transformsEqual中立化到core/snap/offset.ts/runtime/transform-util.ts,两引擎共用(无 babylon→three 依赖)engineCapabilities{gizmo,play,focus,assetDrop}:gizmo 两引擎放开,play/focus/assetDrop 仍 Three-only(B4)BabylonViewport接 gizmo 四方法 + diff 后重放留 B4(已与用户确认):socket 标记视觉(socket 吸附已实现但无标记)、Babylon 材质覆盖、play 行为预览跨引擎。
测试计划
isEngineEditingCapable无残留🤖 Generated with Claude Code