feat(web): draggable floating panels and a non-hanging tutorial demo open
- 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:
14
tests/golden/WEB-PANEL-DRAG-20261123/quick-toolbar.json
Normal file
14
tests/golden/WEB-PANEL-DRAG-20261123/quick-toolbar.json
Normal 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"
|
||||
}
|
||||
20
tests/golden/WEB-PANEL-DRAG-20261123/tool-panels.json
Normal file
20
tests/golden/WEB-PANEL-DRAG-20261123/tool-panels.json
Normal 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"
|
||||
}
|
||||
20
tests/golden/WEB-PANEL-DRAG-20261123/tutorial-panel.json
Normal file
20
tests/golden/WEB-PANEL-DRAG-20261123/tutorial-panel.json
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user