Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Reduce default motion blur to 0.5

Richie McIlroy62ffd76bf445
diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx
index 469b57d68..1064808c1 100644
--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx
+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx
@@ -263,7 +263,7 @@ type CursorPresetValues = {
friction: number;
};
-const DEFAULT_MOTION_BLUR = 1.0;
+const DEFAULT_MOTION_BLUR = 0.5;
const CURSOR_TYPE_OPTIONS = [
{
diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs
index 08615b143..d3230ea7d 100644
--- a/crates/project/src/configuration.rs
+++ b/crates/project/src/configuration.rs
@@ -563,7 +563,7 @@ impl Default for CursorConfiguration {
mass: 3.0,
friction: 70.0,
raw: false,
- motion_blur: 1.0,
+ motion_blur: 0.5,
use_svg: true,
rotation_amount: Self::default_rotation_amount(),
base_rotation: 0.0,
@@ -1200,7 +1200,7 @@ impl Annotation {
}
}
-#[derive(Type, Serialize, Deserialize, Clone, Debug, Default)]
+#[derive(Type, Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase", default)]
pub struct ProjectConfiguration {
pub aspect_ratio: Option<AspectRatio>,
@@ -1233,9 +1233,30 @@ fn camera_config_needs_migration(value: &Value) -> bool {
})
}
+impl Default for ProjectConfiguration {
+ fn default() -> Self {
+ Self {
+ aspect_ratio: Default::default(),
+ background: Default::default(),
+ camera: Default::default(),
+ audio: Default::default(),
+ cursor: Default::default(),
+ hotkeys: Default::default(),
+ timeline: Default::default(),
+ captions: Default::default(),
+ keyboard: Default::default(),
+ clips: Default::default(),
+ annotations: Default::default(),
+ hidden_text_segments: Default::default(),
+ screen_motion_blur: Self::default_screen_motion_blur(),
+ screen_movement_spring: Default::default(),
+ }
+ }
+}
+
impl ProjectConfiguration {
fn default_screen_motion_blur() -> f32 {
- 1.0
+ 0.5
}
pub fn validate(&self) -> Result<(), AnnotationValidationError> {
@@ -1360,6 +1381,14 @@ mod tests {
.unwrap();
}
+ #[test]
+ fn default_motion_blur_is_half() {
+ let config = ProjectConfiguration::default();
+
+ assert_eq!(config.cursor.motion_blur, 0.5);
+ assert_eq!(config.screen_motion_blur, 0.5);
+ }
+
#[test]
fn load_uses_cursor_motion_blur_when_screen_motion_blur_is_missing() {
let dir = tempfile::tempdir().unwrap();