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

Package detail

input-mouse

bunnybones121MIT3.0.7

Convenience API for mouse inputs using signals.

mouse,, signals

readme

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.