Skip to content
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

Faster mouse movement over long distances #35

Merged
merged 1 commit into from Jan 8, 2014

Conversation

Philipp91
Copy link
Contributor

Please also see my comments here: e040ecb

The code below improves speed:

  • On long distances, the total movement time is limited to 175ms (just like the keyframe approach) whereas the previous implementation could take up to 1,9 seconds (on my screen).
  • On short distances, the time can be slower by a factor of sqrt(2), which is on purpose, looks more realistic.
  • I removed the properties. So the following test would fail, if it existed:
  • This implementation does not react to interfering mouse movements by the user or other software and simply continues its path - just like the old keyframe-based version did.

move(1.1, 2.6);
assertThat(getMouse(), is(new Point(1.1, 2.6));

Instead, the mouse would be at 1;3, but that's what users might expect anyway.

minisu pushed a commit that referenced this pull request Jan 8, 2014
Faster mouse movement over long distances
@minisu minisu merged commit af3b768 into TestFX:master Jan 8, 2014
@minisu
Copy link
Member

minisu commented Jan 8, 2014

Wonderful!

@Philipp91 Philipp91 deleted the fastermouse branch January 8, 2014 16:08
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.

None yet

2 participants