Coder Social home page Coder Social logo

arevi / wind-mouse Goto Github PK

View Code? Open in Web Editor NEW
56.0 2.0 5.0 846 KB

A JavaScript library for generating human-like mouse movement data points.

License: MIT License

TypeScript 100.00%
windmouse javascript typescript mouse movement human nodejs

wind-mouse's Introduction

WindMouse

WindMouse is a lightweight, and highly configurable, library for generating human-like mouse movement. The data points are then returned in a x,y point array for further usage.

Installation

npm install windmouse

Usage

const WindMouse = require("windmouse");

// Initialize WindMouse class
const windMouse = new WindMouse(Math.floor(Math.random() * 10));

// MouseSettings
let settings = {
  startX: Math.ceil(Math.random() * 1920),
  startY: Math.ceil(Math.random() * 1080),
  endX: Math.ceil(Math.random() * 1920),
  endY: Math.ceil(Math.random() * 1080),
  gravity: Math.ceil(Math.random() * 10),
  wind: Math.ceil(Math.random() * 10),
  minWait: 2,
  maxWait: Math.ceil(Math.random() * 5),
  maxStep: Math.ceil(Math.random() * 3),
  targetArea: Math.ceil(Math.random() * 10),
};

// Print points
async function logPoints() {
  let points = await windMouse.GeneratePoints(settings);
  console.log(points);
}

logPoints();

WindMouse Visualizer

https://github.com/arevi/mouse-data-visualizer

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

https://opensource.org/licenses/MIT

Credits

The original WindMouse library was created by https://github.com/BenLand100 for Java. This is a port of said library enabling for usage with JavaScript/TypeScript.

wind-mouse's People

Contributors

arevi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.