feat(web): draggable floating panels and a non-hanging tutorial demo open
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

- add a shared useDraggablePanel hook (pointer capture, clamping, offset
  persistence in localStorage, double-click / button / menu reset) and use it
  for the tutorial step panel, the quick toolbar, the adjust-last-operation
  panel and the robot tool drawer
- quick toolbar drags out of the dock into a compact floating bar and can be
  folded; robot tool scrim is transparent and click-through so the 3D scene
  stays visible and usable while the tool is open
- 窗口 > 恢复默认面板位置 clears every stored panel offset
- fix a pre-existing hang: tutorial demo scene opens went through the
  "save current project?" prompt and waited forever; course demos now persist
  the current OPFS project like the dialog's 保存后继续 and continue
- PBR tutorial spec: demos must not auto-download .blend (OPFS-only rule)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-23 21:43:40 +08:00
parent cb2829cad1
commit 2c8449f422
15 changed files with 716 additions and 92 deletions

View File

@@ -0,0 +1,14 @@
{
"schemaVersion": 1,
"browser": "chromium",
"storage": "OPFS",
"workflow": "drag quick toolbar out of the dock -> floating -> fold/unfold -> reset",
"coveredBefore": true,
"coveredAfter": false,
"offset": {
"x": 120,
"y": 150
},
"status": "PASS",
"acceptance": "NOT_CLAIMED"
}

View File

@@ -0,0 +1,20 @@
{
"schemaVersion": 1,
"browser": "chromium",
"storage": "OPFS",
"workflow": "add monkey -> adjust-last-operation drag -> open robot tool -> transparent scrim -> drag drawer",
"adjustOffset": {
"x": 180,
"y": -120
},
"robotOffset": {
"x": -260,
"y": 90
},
"scrim": {
"background": "rgba(0, 0, 0, 0)",
"pointerEvents": "none"
},
"status": "PASS",
"acceptance": "NOT_CLAIMED"
}

View File

@@ -0,0 +1,20 @@
{
"schemaVersion": 1,
"browser": "chromium",
"storage": "OPFS",
"workflow": "/?ui=web&tutorial=pbr&start=1 -> drag step panel -> reload -> 复位 -> drag -> double-click reset",
"before": {
"x": 0,
"y": 0
},
"dragged": {
"x": 160,
"y": 120
},
"stored": {
"x": 0,
"y": 0
},
"status": "PASS",
"acceptance": "NOT_CLAIMED"
}