Skip to main content

pulse_pixelstream_types/
cam_pref.rs

1use myko::prelude::*;
2use myko_macros::myko_item;
3
4/// Durable, GLOBAL camera-control settings for the operator. Unlike `Viewer` /
5/// `ControlLock`, this is NOT a child of `Client`, so it is NOT cascade-deleted on
6/// disconnect — it persists across tab closes and previs relaunches (the previs pawn
7/// resets to level defaults each launch, so the client re-applies these on connect).
8/// One row, id `"global"`: the operator's tuning is shared across every stream.
9#[myko_item]
10pub struct CamPref {
11    pub focal: f32,
12    pub aperture: f32,
13    pub focus_method: String,
14    pub focus_dist: f32,
15    pub base_speed: f32,
16    pub look_scale: f32,
17    pub invert: bool,
18    pub glide: bool,
19    pub glide_secs: f32,
20    pub motion_blur: f32,
21    pub rail_speed: f32,
22}
23
24impl CamPref {
25    /// The single global row id.
26    pub fn row_id() -> CamPrefId {
27        "global".to_string().into()
28    }
29}