Creator corrected the "loupe" zoom on 2026-10-08: the click anchors a fixed
capture region (box/2 centred on the click) and the box is a live 2x view of
that region — dragging the box never changes its content; it magnifies the
fully-composited frame (every layer, incl. webcam) and draws LAST (n+1).
Rectangle shape is 4:3 ("more of a 640x480 aspect").
- MainViewModel.Zoom.cs rewritten: ActivateZoom anchors CaptureX/CaptureY
(independently clamped); UpdateZoomMove relocates the box only; the per-frame
BuildZoomFrame/ZoomFrameBuilder path is gone.
- SceneCompositor: skips the active ZoomSceneElement in every layer loop and
BlitZooms it last via the new pure ZoomMagnifier (2x bilinear, temp snapshot
via ArrayPool, round clip).
- Preview: ZoomBox hoisted above CanvasGrid as a sibling; its brush samples the
whole composed preview at the fixed capture (2x).
- Tests: ZoomMagnifierTests (box-over-blue shows green capture at 2x incl. an
extra red "layer" — the loupe/backdrop-only regressions both fail it) +
round-clip; ZoomBoxInteractionTests rewritten (anchored capture, move-doesn't-
change-capture, 4:3/9:16/square). 404 pass, 2 known environment flakes.
4.7 KiB
4.7 KiB
Models — index
Plain data types. No logic beyond what a property can carry. See
schema.md for the memory-map conventions.
| File | Purpose |
|---|---|
Scene.cs |
A scene: Name, IsHidden, IsChatScene, IsEditing, HasBackdrop (Live-only policy flag, default off — only the canonical Live scene has one, see SceneCatalog), Elements collection (images + webcam config), WebcamConfig accessor |
SceneCatalog.cs |
The five canonical scenes (Starting/Live/BRB/Chat/Ending) — the product, by name: All, IsCanonical, Is(name, canonical) (case-insensitive trim), IsChat, HasBackdrop(name) (true only for Live). Drives the empty-DB seed, the "+" missing-scenes menu, and MainViewModel.EnforceBackdropPolicy |
Source.cs |
A source: SourceType enum (DisplayCapture/WindowCapture/Background/Image/TextOverlay/ChatBox/Countdown/WebSource/MediaSource/AlertBox (TASK 43 — the celebration zone, one per layout) — Webcam removed), X/Y/Width/Height, Opacity, IsEnabled, ImageSource (static) / VideoImageSource (live frames), DisplaySource (IsLiveCapture → video, else static), ClipShape enum (Traditional/Round), IsMirrored + MirrorScale, MirrorButtonText/ShapeButtonText, asset identity, IsImageSource (XAML binds this, never Type), backdrop surface: IsBackdrop (permanent bottom layer, never removable), CaptureKey (persisted monitor:<n>/window:<hwnd>/picker:<name>), IsLiveCapture (Type is Display/WindowCapture) |
SceneElement.cs |
Base for anything placeable in a scene: shared layout/clip/mirror/border surface, virtual IsWebcam/virtual IsImageSource/virtual IsZoomLayer (TASK 51); ToggleClipShape + persisted RectWidth/RectHeight (pre-Round rect so round→rect restores after reload) |
ZoomSceneElement.cs |
Transient zoom box (TASK 51, creator-corrected 2026-10-08): carries the box rect AND the anchored CaptureX/CaptureY (the fixed box/2 capture window set on ActivateZoom; moving the box never touches it). IsZoomActive flips Kind Static→Dynamic (leaves the baked base while active); never persisted (LayoutStore save skips non-Source/non-WebcamSceneConfig rows), never shown in the layers list or the element template (IsZoomLayer gates both). The compositor SKIPS the active element in every layer loop and draws its 2x content LAST (layer n+1) via ZoomMagnifier. |
Webcam.cs |
Singleton webcam identity: Id, DeviceId, Name (one row app-wide) |
WebcamSceneConfig.cs |
Per-scene webcam placement (subclass of SceneElement): geometry + IsVisible + border (BorderColor/BorderOpacity/BorderWidth/BorderAnimation) + VideoImageSource; WebcamId links to Webcam |
QualityOption.cs |
Resolution tier record (Display, Fps, Bitrate, Width, Height); Label formats as 1080p60 (8Mbps) — drives the bottom-bar dropdown and the output-rect math |
StreamConfig.cs |
StreamConfig (note: TargetBitrate/Resolution defaults are stale — not yet wired to the dropdown), StreamHealth (bitrate/FPS/dropped/duration), StreamStatus enum |
MicStatus.cs |
Footer mic indicator: NotConnected / Connected / Problem — the state behind the MIC button's status dot (red = no device/capture off, green = capturing, yellow = a requested mic failed: in use/unplugged) |
YouTube.cs |
YouTubeChannel and ChatMessage (chat feed) — since TASK 43 every message carries Kind (ChatEventKind None/SuperChat/SuperSticker/NewMember/MemberGift/GiftReceived/MemberMilestone) + event payload fields (SuperChatDisplayString, SuperStickerDescription, GiftNewMembersCount, GifterName, MilestoneMonths) |
Socials.cs |
Social bar (global layer, never a Source): SocialService enum (YouTube/Twitch/X/Instagram/TikTok/Facebook/Discord/Kick/Threads/Bluesky/GitHub/LinkedIn/Pinterest/Snapchat/Reddit/WhatsApp/Telegram/Link/Website/Fediverse), SocialEntry (Service/Handle/ProfileUrl/FediverseSoftware), SocialsConfig (Entries + BarPosition Top/Bottom + BarEnabled on/off — BarJustify dropped, column back-compat), SocialServiceIcons (canonical URL builder + DetectService (URL domain / fediverse @user@domain → Fediverse / bare→Website) + bundled SVG logo path data per service (LogoDataFor) + LogoDataForFediverse(software) mapping nodeinfo software names (mastodon/peertube/pixelfed/misskey/lemmy/pleroma/firefish) to logos with a generic fediverse glyph fallback (FediverseIconData) + LockedIconData/DoNotIconData — initials/colors gone) |
Related: ViewModels/index.md consume these;
Services/LayoutStore.cs persists Scene/Source.