-
Notifications
You must be signed in to change notification settings - Fork 1k
Improve auto zoom smoothing for fast cursor movement #1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds ProjectUniforms::auto_zoom_focus to compute zoom center using cursor data, smoothing, velocity, speed factor, and lookahead with UV clamping and fallbacks. Integrates smoothing config in ProjectUniforms::new, replaces inline zoom logic with auto_zoom_focus, and updates InterpolatedZoom construction. Introduces tests validating defaults, stability, and velocity responsiveness. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as App/Frame Loop
participant PU as ProjectUniforms::new
participant AF as auto_zoom_focus
participant IZ as InterpolatedZoom::new
participant GPU as Renderer/GPU
App->>PU: Build uniforms (cursor data, config)
PU->>AF: Compute zoom_focus (cursor + smoothing + velocity)
AF-->>PU: zoom_focus (clamped UV)
PU->>IZ: Construct with zoom_focus
IZ-->>PU: InterpolatedZoom
PU-->>GPU: Submit uniforms for rendering
note over AF,IZ: New centralized zoom-focus and smoothing flow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (4)crates/**/src/**/*.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx,js,jsx,rs}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
crates/*/src/**/*📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)crates/rendering/src/lib.rs (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Before:
Existing.Auto.Zoom.mp4
After:
Improved.Auto.Zoom.mp4
Summary by CodeRabbit