1.1.3 • Published 2 months ago

bezier-mouse-js v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

bezier-mouse-js

bezier-mouse-js is a lightweight javascript library to mirror human-like mouse movements with Bézier curves.

Getting Started

Install the bezier-mouse-js package:

npm install bezier-mouse-js

Simple usage:

const BezierMouse = require("bezier-mouse-js");

(async () => {
  const bezMouse = new BezierMouse();
  await bezMouse.moveAndClick({ x: 100, y: 100 }, { x: 700, y: 700 });
  await bezMouse.moveAndDoubleClick({ x: 700, y: 700 }, { x: 100, y: 100 });
})();

Documentation Here (API Docs)

Demo Here

Demo Examples:

Advanced usage:

const BezierMouse = require("bezier-mouse-js");

(async () => {
  const bezMouse = new BezierMouse(75);
  await bezMouse.moveAndDoubleClick(
    { x: 100, y: 100 },
    { x: 700, y: 700 },
    "LEFT",
    { steps: 110, deviation: 45, flip: false }
  );
  await bezMouse.moveAndDoubleClick({ x: 700, y: 700 }, { x: 150, y: 150 });
})();

Underlying mouse control framework: https://nutjs.dev/

1.1.3

2 months ago

1.1.2

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago