Class MouseMotionNature
- java.lang.Object
-
- net.eternalclient.api.internal.mouse.naturalmouse.support.MouseMotionNature
-
- Direct Known Subclasses:
DefaultMouseMotionNature
public class MouseMotionNature extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MouseMotionNature()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviationProvider
getDeviationProvider()
Get the provider which is used to define how the MouseMotion trajectory is being deviated or arcedint
getEffectFadeSteps()
Effect fade decreases the noise and deviation effects linearly to 0 at the end of the mouse movement, so mouse would end up in the intended target pixel even when noise or deviation would otherwise add offset to mouse position.int
getMinSteps()
Minimum amount of steps that is taken to reach the target, this is used when calculation otherwise would lead to too few steps for smooth mouse movement, which can happen for very fast movements.MouseInfoAccessor
getMouseInfo()
Get the accessor object, which MouseMotion uses to detect the position of mouse on screen.NoiseProvider
getNoiseProvider()
Get the provider which is used to make random mistakes in the trajectory of the moving mouseOvershootManager
getOvershootManager()
Get the manager that deals with overshoot properties.int
getReactionTimeBaseMs()
Get the minimal sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.int
getReactionTimeVariationMs()
Get the random sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.SpeedManager
getSpeedManager()
Get the speed manager.SystemCalls
getSystemCalls()
Get a system call interface, which MouseMotion uses internallydouble
getTimeToStepsDivider()
Time to steps is how NaturalMouseMotion calculates how many locations need to be visited between start and end point.void
setDeviationProvider(DeviationProvider deviationProvider)
Set the provider which is used to define how the MouseMotion trajectory is being deviated or arced.void
setEffectFadeSteps(int effectFadeSteps)
Effect fade decreases the noise and deviation effects linearly to 0 at the end of the mouse movement, so mouse would end up in the intended target pixel even when noise or deviation would otherwise add offset to mouse position.void
setMinSteps(int minSteps)
Minimum amount of steps that is taken to reach the target, this is used when calculation otherwise would lead to too few steps for smooth mouse movement, which can happen for very fast movements.void
setMouseInfo(MouseInfoAccessor mouseInfo)
Set the accessor object, which MouseMotion uses to detect the position of mouse on screen.void
setNoiseProvider(NoiseProvider noiseProvider)
set the provider which is used to make random mistakes in the trajectory of the moving mouse.void
setOvershootManager(OvershootManager overshootManager)
Set the manager that deals with overshoot properties.void
setReactionTimeBaseMs(int reactionTimeBaseMs)
Set the minimal sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.void
setReactionTimeVariationMs(int reactionTimeVariationMs)
Set the random sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.void
setSpeedManager(SpeedManager speedManager)
Sets the speed manager.void
setSystemCalls(SystemCalls systemCalls)
Set a system call interface, which MouseMotion uses internally.void
setTimeToStepsDivider(double timeToStepsDivider)
Time to steps is how NaturalMouseMotion calculates how many locations need to be visited between start and end point.
-
-
-
Method Detail
-
getTimeToStepsDivider
public double getTimeToStepsDivider()
Time to steps is how NaturalMouseMotion calculates how many locations need to be visited between start and end point. More steps means more smooth movement. Thus increasing this divider means less steps and decreasing means more steps.- Returns:
- the divider which is used to get amount of steps from the planned movement time
-
setTimeToStepsDivider
public void setTimeToStepsDivider(double timeToStepsDivider)
Time to steps is how NaturalMouseMotion calculates how many locations need to be visited between start and end point. More steps means more smooth movement. Thus increasing this divider means less steps and decreasing means more steps. The default value should be as smooth as needed for any real purpose. So unless this really is the issue, you shouldn't touch this value.- Parameters:
timeToStepsDivider
- the divider which is used to get amount of steps from the planned movement time
-
getMinSteps
public int getMinSteps()
Minimum amount of steps that is taken to reach the target, this is used when calculation otherwise would lead to too few steps for smooth mouse movement, which can happen for very fast movements.- Returns:
- the minimal amount of steps used.
-
setMinSteps
public void setMinSteps(int minSteps)
Minimum amount of steps that is taken to reach the target, this is used when calculation otherwise would lead to too few steps for smooth mouse movement, which can happen for very fast movements. The default value should cover your needs, usually no need to touch this.- Parameters:
minSteps
- the minimal amount of steps used
-
getEffectFadeSteps
public int getEffectFadeSteps()
Effect fade decreases the noise and deviation effects linearly to 0 at the end of the mouse movement, so mouse would end up in the intended target pixel even when noise or deviation would otherwise add offset to mouse position.- Returns:
- the number of steps before last the effect starts to fade
-
setEffectFadeSteps
public void setEffectFadeSteps(int effectFadeSteps)
Effect fade decreases the noise and deviation effects linearly to 0 at the end of the mouse movement, so mouse would end up in the intended target pixel even when noise or deviation would otherwise add offset to mouse position.- Parameters:
effectFadeSteps
- the number of steps before last the effect starts to fade
-
getReactionTimeBaseMs
public int getReactionTimeBaseMs()
Get the minimal sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.- Returns:
- the sleep time
-
setReactionTimeBaseMs
public void setReactionTimeBaseMs(int reactionTimeBaseMs)
Set the minimal sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target.- Parameters:
reactionTimeBaseMs
- the sleep time
-
getReactionTimeVariationMs
public int getReactionTimeVariationMs()
Get the random sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target. Random part of this is added to the reactionTimeBaseMs.- Returns:
- reactionTimeVariationMs the sleep time
-
setReactionTimeVariationMs
public void setReactionTimeVariationMs(int reactionTimeVariationMs)
Set the random sleep time when overshoot or some other feature has caused mouse to miss the original target to prepare for next attempt to move the mouse to target. Random part of this is added to the reactionTimeBaseMs.- Parameters:
reactionTimeVariationMs
- the sleep time
-
getDeviationProvider
public DeviationProvider getDeviationProvider()
Get the provider which is used to define how the MouseMotion trajectory is being deviated or arced- Returns:
- the provider
-
setDeviationProvider
public void setDeviationProvider(DeviationProvider deviationProvider)
Set the provider which is used to define how the MouseMotion trajectory is being deviated or arced. Alters the underlying nature instance in this factory.- Parameters:
deviationProvider
- the provider
-
getNoiseProvider
public NoiseProvider getNoiseProvider()
Get the provider which is used to make random mistakes in the trajectory of the moving mouse- Returns:
- the provider
-
setNoiseProvider
public void setNoiseProvider(NoiseProvider noiseProvider)
set the provider which is used to make random mistakes in the trajectory of the moving mouse. Alters the underlying nature instance in this factory.- Parameters:
noiseProvider
- the provider
-
getMouseInfo
public MouseInfoAccessor getMouseInfo()
Get the accessor object, which MouseMotion uses to detect the position of mouse on screen.- Returns:
- the accessor
-
setMouseInfo
public void setMouseInfo(MouseInfoAccessor mouseInfo)
Set the accessor object, which MouseMotion uses to detect the position of mouse on screen.- Parameters:
mouseInfo
- the accessor object
-
getSystemCalls
public SystemCalls getSystemCalls()
Get a system call interface, which MouseMotion uses internally- Returns:
- the interface
-
setSystemCalls
public void setSystemCalls(SystemCalls systemCalls)
Set a system call interface, which MouseMotion uses internally.- Parameters:
systemCalls
- the interface
-
getSpeedManager
public SpeedManager getSpeedManager()
Get the speed manager. SpeedManager controls how long does it take to complete a movement and within that time how slow or fast the cursor is moving at a particular moment, the flow of movement.- Returns:
- the SpeedManager
-
setSpeedManager
public void setSpeedManager(SpeedManager speedManager)
Sets the speed manager. SpeedManager controls how long does it take to complete a movement and within that time how slow or fast the cursor is moving at a particular moment, the flow of movement.- Parameters:
speedManager
- the SpeedManager
-
getOvershootManager
public OvershootManager getOvershootManager()
Get the manager that deals with overshoot properties. Overshoots provide a realistic way to simulate user trying to reach the destination with mouse, but miss.- Returns:
- the manager
-
setOvershootManager
public void setOvershootManager(OvershootManager overshootManager)
Set the manager that deals with overshoot properties. Overshoots provide a realistic way to simulate user trying to reach the destination with mouse, but miss.- Parameters:
overshootManager
- the manager
-
-