feat(camera): desk view for Full Camera sections, with a covered tilt - #989
christian-wr wants to merge 1 commit into
Conversation
A Full Camera section can now show a webcam tilted down onto the desk: "Desk view" in the inspector turns the camera 180°, switches the mirror off for that section (otherwise text on the page reads back to front) and shows the whole camera frame instead of the face crop. The timeline marks such sections with a rotate icon. The moment the camera is tilted is covered at both ends of the section: the whole camera picture is blurred and dimmed for the Full Camera grow (and the shrink), fading in and out around it, with a translated "Desk mode" label over it that can be switched off per section. Preview and export render it identically through the compositor's frame plan. - Rust: per-frame orientation (u/v bound swaps, crop bypass) and cover strength, a `LayerCB.cover` lane (HLSL, WGSL, MSL), the blur clamped to the camera's valid area so aligned decoder padding never bleeds in, two label text animations. - App: `rotation` / `mirror` / `deskLabel` on Full Camera regions (defaults are not stored), store and persistence, inspector controls, generated label annotations per projected piece, translations in every locale. - Tests for each layer; WGSL is validated with naga on every host.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (3)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (44)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughFull Camera regions now support rotation, mirroring, full-frame display, and desk-label settings. Scene generation and compositor rendering apply those settings, including transition cover effects. The editor exposes the controls, and locale changes refresh the native scene. ChangesFull Camera desk view
Locale-triggered scene refresh
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~50 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Editor as Full Camera editor
participant Timeline as useTimeline
participant Scene as buildSceneDescription
participant Compositor as Native compositor
Editor->>Timeline: Save orientation and desk-label settings
Timeline->>Scene: Provide camera fullscreen regions
Scene->>Compositor: Push serialized camera regions and projected labels
Merge Risk: ⚪ Minimal · up to The Full Camera desk-view change looks consistent across the editor, scene description and compositor. The author reports the tests pass. Rendering on macOS and Linux was not tested manually, and the Metal shader is compiled only by CI. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The camera settings remain within the existing project workflow, with compatible defaults and bounded rendering behavior. The main remaining concern is whether overlapping edits preserve earlier changes and a coherent undo history. No new security vulnerability was established. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 71.93% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 57 functions across 25 files. (19 skipped: 19 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.98.1)Clippy execution failed 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. Comment |
Summary
Record the papers on your desk with the same webcam that films your face: tilt it down, and a Full Camera section shows the desk the right way up.
How it is built
WebcamOrientation(u/v bound swaps, crop bypass) and cover strength from the Full Camera region in effect; a newLayerCB.coverlane (appended last — Rust, HLSL, WGSL and MSL agree at offset 176 / 192 bytes, pinned by the existing size/offset test); the blur reuses the background effect's Vogel kernel and is clamped to the camera's valid area, so aligned decoder padding (1080 lines in a 1088-line texture) never bleeds in; two label animations intext_anim.rotation/mirror/deskLabelon Full Camera regions, one undo step per change, persistence normalises unknown values; the label is generated like captions, one start/end pair per projected piece of the section, so it always matches the blur — also for sections split across clips.Known limitation: inside a speed region the label fades on source time while the blur runs on screen time (as every annotation does), so at 2× the label fades half as fast as the blur.
Related issue
None — new feature.
Type of change
Release impact
Desktop impact
Screenshots / video
Can follow on request (a short before/after of the tilt).
Testing
npm run test(303 files, 4179 passed), bothtscconfigs,npm run lint(0 errors),npm run i18n:check.cargo test -p openscreen-compositor --libon Windows ARM64: all new tests pass, including a naga validation oflayer.wgsl(with theLAYER_MODELSprefix) that runs on every host. Thepipeline_windows::teststhat need hardware video decode fail on this host with or without this change.electron . export, synthetic asymmetric 1080p and 720p cameras):technical-documentation/testing/manual-e2e-checklist.mdtogether with the measurements.Summary by CodeRabbit