Repository navigation
Animation Guide
Oğuzhan edited this page Jul 21, 2025
·
5 revisions
JSAutoGUI let's you smoothly move your cursor with a smoothing function of your own.
The default tween is the linear tween which is defined as:
function linear(n) {
return n
}Here the variable n will go from 0 to 1 overtime, and the returned value is expected to be a smooth transition from 0 to 1.
Here's an example of a quadratic tween with moveRel:
gui.mouse.moveRel(100, 100, 5000, n => n * n)This will move the mouse 100 pixels to right and down diagonally with the given quadratic smoothing function.
Here's a list of pre-defined tweens that you can use like gui.linear:
gui.lineargui.easeInQuadgui.easeOutQuadgui.easeInOutQuadgui.easeInCubicgui.easeOutCubicgui.easeInOutCubicgui.easeInQuartgui.easeOutQuartgui.easeInOutQuartgui.easeInQuintgui.easeOutQuintgui.easeInOutQuintgui.easeInPolygui.easeOutPolygui.easeInOutPolygui.easeInSinegui.easeOutSinegui.easeInOutSinegui.easeInExpogui.easeOutExpogui.easeInOutExpogui.easeInCircgui.easeOutCircgui.easeInOutCircgui.easeInElasticgui.easeOutElasticgui.easeInOutElasticgui.easeInBackgui.easeOutBackgui.easeInOutBackgui.easeInBouncegui.easeOutBouncegui.easeInOutBounce