From 76ce9925051377eacc308bc4d4edc04825f5329d Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 7 Jun 2026 22:18:08 +0200 Subject: [PATCH] Video over token, free-form video windows --- ...form-layout-for-floating-camera-windows.md | 199 +++++++ eslint.config.js | 2 + lang/en.json | 18 +- lang/fr.json | 18 +- module.js | 104 +++- src/foundry/FoundryAdapter.js | 6 + src/ui/gm/DirectorsBoard.js | 1 + src/ui/gm/FreeformCameraWindow.js | 250 +++++++++ src/ui/gm/FreeformLayoutManager.js | 264 ++++++++++ src/ui/gm/GMActorMappingPanel.js | 124 +++++ src/ui/gm/ScryingPoolSettings.js | 89 +++- src/ui/gm/ScryingPoolStrip.js | 4 +- src/ui/shared/ScryingPoolCameraViews.js | 136 ++++- src/ui/shared/TokenVideoOverlay.js | 282 ++++++++++ styles/components/_actor-mapping.less | 117 +++++ styles/components/_freeform-camera.less | 200 ++++++++ styles/scrying-pool.css | 272 ++++++++++ styles/scrying-pool.less | 4 + templates/actor-mapping.hbs | 25 + templates/freeform-camera.hbs | 23 + templates/settings.hbs | 62 +++ .../unit/ui/shared/TokenVideoOverlay.test.js | 485 ++++++++++++++++++ 22 files changed, 2649 insertions(+), 36 deletions(-) create mode 100644 _bmad-output/implementation-artifacts/5-3-freeform-layout-for-floating-camera-windows.md create mode 100644 src/ui/gm/FreeformCameraWindow.js create mode 100644 src/ui/gm/FreeformLayoutManager.js create mode 100644 src/ui/gm/GMActorMappingPanel.js create mode 100644 src/ui/shared/TokenVideoOverlay.js create mode 100644 styles/components/_actor-mapping.less create mode 100644 styles/components/_freeform-camera.less create mode 100644 templates/actor-mapping.hbs create mode 100644 templates/freeform-camera.hbs create mode 100644 tests/unit/ui/shared/TokenVideoOverlay.test.js diff --git a/_bmad-output/implementation-artifacts/5-3-freeform-layout-for-floating-camera-windows.md b/_bmad-output/implementation-artifacts/5-3-freeform-layout-for-floating-camera-windows.md new file mode 100644 index 0000000..a133dba --- /dev/null +++ b/_bmad-output/implementation-artifacts/5-3-freeform-layout-for-floating-camera-windows.md @@ -0,0 +1,199 @@ +# Story 5.3: Freeform Layout for Floating Camera Windows + +**Status:** ready-for-dev + +**Epic:** 5 - Full AV Replacement + +**Story Key:** 5-3-freeform-layout-floating-windows + +**Created:** 2026-06-07 + +**Last Updated:** 2026-06-07 + +**Target Version:** v0.2.0 + +--- + +## Story Header + +| Field | Value | +|-------|-------| +| **Epic** | 5 - Full AV Replacement | +| **Story ID** | 5.3 | +| **Story Key** | 5-3-freeform-layout-floating-windows | +| **Title** | Freeform Layout for Floating Camera Windows | +| **Status** | ready-for-dev | +| **Priority** | Medium | +| **Assigned Agent** | DEV | +| **Created** | 2026-06-07 | +| **Last Updated** | 2026-06-07 | + +--- + +## Story Requirements + +### User Story + +**As a** GM using Scrying Pool, +**I want to** select a "Windows" layout mode where each participant's camera feed appears in its own freely draggable and resizable window, +**So that** I can arrange camera feeds anywhere on my screen, resize them independently, and close/hide participants individually. + +### Acceptance Criteria + +#### AC-1: Layout Selector +**Given** the module is active and GM opens the Director's Board +**When** the GM looks at the layout selector +**Then** there is a 7th layout button labeled "Windows" (icon: `fa-window-restore`) +**And** clicking it switches to freeform mode +**And** the previously active layout (e.g. vertical/horizontal/mosaic) is replaced — freeform is mutually exclusive + +#### AC-2: Per-Participant Floating Windows +**Given** the GM has selected the freeform layout +**Then** each visible participant (not hidden from table) gets their own `ApplicationV2` floating window +**And** the GM's own feed is included if `showGMSelfFeed` is enabled and GM has video active +**And** each window displays the participant's webcam feed as an `