Infinite-Chess / infinitechess.org

Infinite Chess Web Server
https://www.infinitechess.org
GNU Affero General Public License v3.0
187 stars 43 forks source link

Board momentum after dragging #23

Open optim-ally opened 4 months ago

optim-ally commented 4 months ago

I noticed that board navigation has momentum while zooming in/out but not when moving side-to-side/up-and-down. Should the board also have translational momentum?

(By "momentum" I mean that it continues to move after the user has stopped interacting and gently slows down until it comes to a halt.)

Naviary2 commented 4 months ago

It does! But only when using WASD to move, not with the mouse.

Entificationcurry commented 6 days ago

They sent me to work on it 🔥(that's how you know your suggestion will never occur, it took me 10 hours to make a glitchy version 😭)

Entificationcurry commented 5 days ago

Well nevermind I finished it and it works pretty well

Naviary2 commented 5 days ago

@optim-ally https://discord.com/channels/1114425729569017918/1115358966642393190/1305278858978656277

Naviary2 commented 5 days ago

This is now a feature on desktop! I won't close yet as it isn't applied to mobile devices that don't support a mouse, but an idea I have for getting it to work is:

Whenever you drag the board, whether it's by the mouse or by your finger, the boards position changes, right? Well if we just record the recent history of the board position, we can pull its velocity directly out of that! We constantly update its velocity while it's being dragged, and even though it's snapped to the mouse/finger, once you release it that velocity will take over!