@@ -17,7 +17,8 @@ const CLICK_SHRINK_SIZE: f32 = 0.7;
1717const CURSOR_IDLE_MIN_DELAY_MS : f64 = 500.0 ;
1818const CURSOR_IDLE_FADE_OUT_MS : f64 = 400.0 ;
1919const CURSOR_VECTOR_CAP : f32 = 320.0 ;
20- const CURSOR_MIN_MOTION : f32 = 0.01 ;
20+ const CURSOR_MIN_MOTION_NORMALIZED : f32 = 0.01 ;
21+ const CURSOR_MIN_MOTION_PX : f32 = 1.0 ;
2122const CURSOR_BASELINE_FPS : f32 = 60.0 ;
2223const CURSOR_MULTIPLIER : f32 = 3.0 ;
2324const CURSOR_MAX_STRENGTH : f32 = 5.0 ;
@@ -243,7 +244,8 @@ impl CursorLayer {
243244 let normalized_motion = ( ( combined_motion_px. x / screen_diag) . powi ( 2 )
244245 + ( combined_motion_px. y / screen_diag) . powi ( 2 ) )
245246 . sqrt ( ) ;
246- let has_motion = normalized_motion > CURSOR_MIN_MOTION && cursor_strength > f32:: EPSILON ;
247+ let has_motion =
248+ normalized_motion > CURSOR_MIN_MOTION_NORMALIZED && cursor_strength > f32:: EPSILON ;
247249 let scaled_motion = if has_motion {
248250 clamp_cursor_vector ( combined_motion_px * cursor_strength)
249251 } else {
@@ -439,8 +441,8 @@ impl CursorLayer {
439441
440442fn combine_cursor_motion ( parent : XY < f32 > , child : XY < f32 > ) -> XY < f32 > {
441443 fn combine_axis ( parent : f32 , child : f32 ) -> f32 {
442- if parent. abs ( ) > CURSOR_MIN_MOTION
443- && child. abs ( ) > CURSOR_MIN_MOTION
444+ if parent. abs ( ) > CURSOR_MIN_MOTION_PX
445+ && child. abs ( ) > CURSOR_MIN_MOTION_PX
444446 && parent. signum ( ) != child. signum ( )
445447 {
446448 0.0
0 commit comments