input-mouse

3.0.7 • Public • Published

input-mouse

experimental

Convenience API for mouse inputs using signals.

This is primarily written for interactive graphical work which use webGL coordinates instead of pixel coordinates. In other words the center of the screen is [0,0], the top left is [-1,-1] and the bottom right is [1,1].

Futhermore a distinction is made between moving, dragging and hovering.

  • Movement during mouseDown is dragging.
  • Movement during mouseUp is hovering.
  • Movement during either is moving.

Clicks are interpretted manually, and movement must be no more than 5 pixels to register as a click.

Usage

NPM

License

MIT, see LICENSE.md for details.

Readme

Keywords

Package Sidebar

Install

npm i input-mouse

Weekly Downloads

1

Version

3.0.7

License

MIT

Last publish

Collaborators

  • bunnybones1