Package net.openosrs.api.input.motion
Class MousePath
- java.lang.Object
-
- net.openosrs.api.input.motion.MousePath
-
public final class MousePath extends java.lang.ObjectA planned movement: where the cursor goes, and when.Paths are values. Planning is separated from execution so a path can be inspected, drawn on the overlay, compared against a recording or asserted in a test without any of it touching the game.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMousePath.StepOne sampled cursor position and the delay before it is emitted.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MousePathempty()intgetAimPauseMs()Pause between arriving and pressing the button.java.lang.StringgetAlgorithm()java.lang.StringgetGesture()Backward-compatible alias for the kinematic movement algorithm name.intgetReactionMs()Pause before the first movement, representing noticing and deciding.java.util.List<MousePath.Step>getSteps()booleanisEmpty()booleanisOvershot()MousePath.Steplast()intsize()java.lang.StringtoString()inttotalDurationMs()Total wall time the path will take, including both pauses.doubletravelledDistance()Straight-line length actually travelled, useful for comparing against recordings.
-
-
-
Method Detail
-
empty
public static MousePath empty()
-
getSteps
public java.util.List<MousePath.Step> getSteps()
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
getReactionMs
public int getReactionMs()
Pause before the first movement, representing noticing and deciding.
-
getAimPauseMs
public int getAimPauseMs()
Pause between arriving and pressing the button.
-
isOvershot
public boolean isOvershot()
-
getAlgorithm
public java.lang.String getAlgorithm()
-
getGesture
public java.lang.String getGesture()
Backward-compatible alias for the kinematic movement algorithm name.
-
last
public MousePath.Step last()
-
totalDurationMs
public int totalDurationMs()
Total wall time the path will take, including both pauses.
-
travelledDistance
public double travelledDistance()
Straight-line length actually travelled, useful for comparing against recordings.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-