Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bezier-mouse-js

ChrisdeWolf151MIT1.1.5

Lightweight javascript library to mirror human-like mouse movements with Bézier curves.

automation, bot, botting, bezier, mouse, bezier-curves, mouse-emulation, autoclicker, mouse-movement

readme

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/