forked from 1b-agent/opencadstudio-upstream
feat(paper): render the sheet as a top-locked GPU viewport
Paper space now renders its sheet through the unified shader, the same path as model space: a full-canvas "sheet" ViewportInstance draws the layout's own entities + viewport borders + interim/preview wires, with a camera locked to the top/plan orientation (paper is 2-D and never orbits). Floating content viewports overlay it. - PaperCanvas no longer draws entity wires (still paints the desk, sheet and hatch/wipeout/image fills; full removal is the next step). - Right-drag on the paper sheet no longer orbits the camera (it would corrupt the frame and skew subsequent pans). - Fix floating-viewport orbit oscillation: orbit_active_viewport wrote view_direction.y negated while camera_for_viewport reads it un-negated, so each drag step read back a Y-mirrored camera and flipped the model between a rotation and its opposite every frame. Store eye directly, matching snap_active_viewport_to_direction and the reader. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
568422679d
commit
0ef99ff2fc
4 files changed
+65
-64
No files matched your search
+7
-1
@@ -1951,12 +1951,18 @@ impl OpenCADStudio {
|
||||
drop(sel);
|
||||
self.tabs[i].scene.orbit_active_viewport(dx, dy);
|
||||
return Task::none();
|
||||
} else {
|
||||
} else if self.tabs[i].scene.current_layout == "Model" {
|
||||
sel.right_last_pos = Some(p);
|
||||
drop(sel);
|
||||
self.tabs[i].scene.camera.borrow_mut().orbit(dx, dy);
|
||||
self.tabs[i].scene.camera_generation += 1;
|
||||
return Task::none();
|
||||
} else {
|
||||
// Paper sheet is top-locked: right-drag never
|
||||
// orbits it (orbiting would corrupt the camera
|
||||
// frame and skew subsequent pans).
|
||||
sel.right_last_pos = Some(p);
|
||||
return Task::none();
|
||||
}
|
||||
} else {
|
||||
sel.right_last_pos = Some(p);
|
||||
|
||||
Reference in new issue
Block a user