Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libs/cua-driver-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion libs/cua-driver-rs/crates/cursor-overlay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ pub mod path_planner;
pub mod shape;
pub mod capture_utils;
pub mod util;
pub mod render_state;

pub use palette::Palette;
pub use motion::MotionConfig;
pub use motion::{MotionConfig, Spring};
pub use bezier::CubicBezier;
pub use path_planner::{PathPlanner, PlannedPath, PathState};
pub use shape::CursorShape;
pub use render_state::{RenderStateCore, FocusRect, render_frame, draw_default_arrow};

/// Configuration assembled from CLI arguments and passed to every
/// platform backend when it initialises the overlay window.
Expand Down
17 changes: 17 additions & 0 deletions libs/cua-driver-rs/crates/cursor-overlay/src/motion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,20 @@ impl MotionConfig {
}
}
}

/// Post-arrival spring physics state.
///
/// When the cursor reaches the end of a planned path the engine
/// hands control to a spring-damper that overshoots a touch and
/// settles to the target. This struct holds the spring's mutable
/// state across ticks. Identical across all platform crates — was
/// duplicated 3× before the 2026-05 dedup audit.
///
/// `(ox, oy)` = offset from the spring target; `(vx, vy)` = velocity.
#[derive(Clone, Copy, Default)]
pub struct Spring {
pub ox: f64,
pub oy: f64,
pub vx: f64,
pub vy: f64,
}
Loading
Loading