Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

user-input-mouse

2.0.0 • Public • Published

user-input-mouse

Base class for creating user inputs.

Usage

NPM

Examples

var mouse = window.mouseInput(document)

When the user presses the left mouse button, mouse would contain the following.

{
    "x": 0,
    "y": 0,
    "mouse0": 1
}

When the user releases the left mouse button, and then presses the right mouse button, mouse would contain the following.

{
    "x": 0,
    "y": 0,
    "mouse0": 0,
    "mouse2": 1
}

Tests

  • Mocha
    • Test functionality in Node.js
    • npm test
  • User Test
    • Test functionality in browser.
    • npm user-test

install

npm i user-input-mouse

Downloadsweekly downloads

1

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability