Skip to content

feat(frames): draw a window chrome around the screen plane - #688

Draft
EtienneLescot wants to merge 2 commits into
mainfrom
feat/3d-window-frame
Draft

EtienneLescot wants to merge 2 commits into
mainfrom
feat/3d-window-frame

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Decoration frame: window chrome drawn around the screen plane (mode 14), per-project setting. Annotations and privacy masks anchor on the framed content.

Chantier 3D, PR 4a. Spec complète et branche d intégration : #682.

🤖 Generated with Claude Code

Add a project appearance setting, `frame`: "none" (default), "window-light"
or "window-dark". A frame draws a title bar with three dots and a hairline
border around the recording, as a new SDF shader mode (14) in HLSL, MSL and
WGSL.

Geometry lives in frame_geometry.rs, once for all three backends:
- the screen box shrinks so screen + frame fit where the screen used to be,
  so padding keeps its meaning and nothing leaves the canvas;
- the frame quad is the screen quad dilated by the frame margins; under a
  3D preset it extrapolates the same TiltedQuad, so it tilts with the screen;
- the drop shadow (mode 2 / mode 12) is carried by the frame quad;
- Roundness rounds the frame; the screen keeps square top corners under the
  title bar (mode 0 `mb.w`, mode 8 `dst_prev.z`, both zero without a frame).

Without a frame the render is byte-identical to before: the new flags read
zero, `SceneFrame` defaults on the Rust side, and the app omits the key.

The setting flows through editorSettings, style presets (optional in v1
preset files), the scene contract and a "Window" menu in the Composition
panel, translated in all 14 locales.
…nt rect

With a window frame on, the preview overlay placed its handles on the
unshrunk screen box while the compositor drew the content, and the blur
mask, inside the shrunk box: a blur drawn over a secret landed a title
bar lower and left a readable strip.

- s_ann is now the frame-shrunk box, so text, arrows, blur and zoom_k
  all use the content rect;
- fitInWindowFrame ports fit_in_window_frame to TS, and the preview
  stage uses it (the native payload keeps the unshrunk rect);
- tests pin the shared rect in Rust and TS, check that the framed
  privacy mask contains what the overlay shows, and pin the no-frame
  screen box bit for bit against the scene input.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant