feat(scene): rotate video previews like images

Reuse previewRotationDeg for video scenes across editor, control,
presentation and overlays via ContainedVideo layout parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-08-11 12:17:57 +08:00
parent 1d94c95cc8
commit 7362a36fe5
10 changed files with 220 additions and 70 deletions
@@ -29,6 +29,21 @@ void test('video scenes share map overlays / effects with image scenes', () => {
assert.ok(editor.includes("previewAssetType === 'image' || previewAssetType === 'video'"));
assert.ok(editor.includes('windows.openSceneEditor'));
assert.ok(editor.includes('ContainedVideo'));
assert.ok(editor.includes('onRotatePreview'));
assert.match(
editor,
/previewAssetId && \(previewAssetType === 'image' \|\| previewAssetType === 'video'\) \? \([\s\S]*?onRotatePreview/,
);
assert.ok(fs.readFileSync(path.join(rendererRoot, 'shared/ContainedVideo.tsx'), 'utf8').includes('rotationDeg'));
assert.ok(
fs
.readFileSync(path.join(rendererRoot, 'control/ControlScenePreview.tsx'), 'utf8')
.includes('rotationDeg={rot}'),
);
assert.ok(presentation.includes('rotationDeg={rot}'));
assert.ok(sceneEditor.includes('rotationDeg={rot}'));
assert.ok(main.includes("scene?.previewAssetType === 'video'"));
assert.ok(main.includes('syncSceneDarknessForProject'));