Skip to content

Add velocity-based continuous scroll zoom to MapManipulator#188

Open
SamHL wants to merge 1 commit intopelicanmapping:mainfrom
SamHL:feat/velocity-scrolling-zoom
Open

Add velocity-based continuous scroll zoom to MapManipulator#188
SamHL wants to merge 1 commit intopelicanmapping:mainfrom
SamHL:feat/velocity-scrolling-zoom

Conversation

@SamHL
Copy link

@SamHL SamHL commented Dec 17, 2025

Replaces discrete task-based zoom with a velocity accumulation system. This eliminates stuttering when scrolling rapidly by accumulating scroll inputs and applying smooth exponential decay.

Features:

  • Frame-rate independent physics using exponential decay
  • Velocity accumulates naturally with rapid scrolling
  • Max velocity cap prevents jarring zoom speeds
  • Configurable via Settings: scrollZoomEnabled, scrollZoomAcceleration, scrollZoomFriction, scrollZoomThreshold, maxScrollZoomVelocity
  • Falls back to legacy task-based zoom when disabled
  • Cancels on mouse button press for intuitive interaction

Replaces discrete task-based zoom with a velocity accumulation system.
This eliminates stuttering when scrolling rapidly by accumulating scroll
inputs and applying smooth exponential decay.

Features:
- Frame-rate independent physics using exponential decay
- Velocity accumulates naturally with rapid scrolling
- Max velocity cap prevents jarring zoom speeds
- Configurable via Settings: scrollZoomEnabled, scrollZoomAcceleration,
  scrollZoomFriction, scrollZoomThreshold, maxScrollZoomVelocity
- Falls back to legacy task-based zoom when disabled
- Cancels on mouse button press for intuitive interaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant