From d12507632d410ff492ea4f9545c5e68ff9d72b59 Mon Sep 17 00:00:00 2001 From: EtienneLescot Date: Thu, 1 Oct 2026 16:25:43 +0200 Subject: [PATCH 1/2] feat(camera): square camera by default, "Original" keeps the camera's own proportions The picture-in-picture camera now starts square. The other shape, which follows the camera's own aspect (a portrait camera stays portrait), is labelled "Original" instead of "Rectangle". Each shape has its own default roundness, 70% for Square and 40% for Original. An untouched roundness follows the shape when it changes; a tuned one is kept. Projects saved with a shape keep the look they had. The editor's drag box was laid out from a fixed 4:3 camera while the native canvas drew the real one. Both now read webcamBoxSourceSize, so the box matches the picture. --- src/components/ai-edition/PreviewCanvas.tsx | 33 +++++++--- .../ai-edition/RightPanes.layout.test.tsx | 20 ++++++- .../ai-edition/RightPanes.tooltips.test.tsx | 5 +- src/components/ai-edition/RightPanes.tsx | 13 +++- .../video-editor/projectPersistence.test.ts | 2 +- src/components/video-editor/types.ts | 2 +- src/i18n/locales/ar/settings.json | 4 +- src/i18n/locales/cs/settings.json | 4 +- src/i18n/locales/de/settings.json | 4 +- src/i18n/locales/en/settings.json | 4 +- src/i18n/locales/es/settings.json | 4 +- src/i18n/locales/fr/settings.json | 4 +- src/i18n/locales/it/settings.json | 4 +- src/i18n/locales/ja-JP/settings.json | 4 +- src/i18n/locales/ko-KR/settings.json | 4 +- src/i18n/locales/pt-BR/settings.json | 4 +- src/i18n/locales/ru/settings.json | 4 +- src/i18n/locales/tr/settings.json | 4 +- src/i18n/locales/vi/settings.json | 4 +- src/i18n/locales/zh-CN/settings.json | 4 +- src/i18n/locales/zh-TW/settings.json | 4 +- .../ai-edition/store/editorSettings.test.ts | 5 +- src/lib/compositeLayout.ts | 2 +- src/lib/projectDefaults.ts | 40 ++++++++++--- src/native/sceneDescription.test.ts | 4 +- src/native/sceneDescription.ts | 60 ++++++++++++------- website/docs/editing-timeline.md | 2 +- website/docs/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- .../current/editing-timeline.md | 2 +- .../current/guides/product-demo-video.md | 2 +- 42 files changed, 181 insertions(+), 97 deletions(-) diff --git a/src/components/ai-edition/PreviewCanvas.tsx b/src/components/ai-edition/PreviewCanvas.tsx index b5b72167b..79d95e5ed 100644 --- a/src/components/ai-edition/PreviewCanvas.tsx +++ b/src/components/ai-edition/PreviewCanvas.tsx @@ -23,7 +23,7 @@ // as the user resizes the workbench. import type { PointerEvent as ReactPointerEvent } from "react"; -import { useEffect, useMemo, useRef, useState } from "react"; +import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react"; import { type CameraFullscreenRegion, type CropRegion, @@ -62,6 +62,12 @@ import { webcamAnchorAt } from "@/lib/projectDefaults"; import { wallpaperStyle } from "@/lib/wallpaper"; import { getCssClipPath } from "@/lib/webcamMaskShapes"; import { computeCameraFullscreenProgress } from "@/lib/zoomMath/cameraFullscreenUtils"; +import { webcamBoxSourceSize } from "@/native/sceneDescription"; +import { + getWebcamNativeSize, + getWebcamNativeSizeRevision, + subscribeWebcamNativeSize, +} from "@/native/webcamSizeCache"; import { AnnotationLayer } from "./AnnotationLayer"; import { NativeCompositorOverlay } from "./NativeCompositorOverlay"; import styles from "./NewEditorShell.module.css"; @@ -119,11 +125,6 @@ interface PreviewCanvasProps { // (the