3.0.0 • Published 7 months ago

poin v3.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 months ago

Poin

A javascript utility for polling the state of the pointer (be it mouse or touch).

Usage

You can poll the position of the pointer using Poin.position. This works for both the mouse pointer and the touch screen pointer.

player.position.x = Poin.position.x
player.position.y = Poin.position.y

You can poll the state of a press using Poin.wasJustPressed(buttonNumber). For buttonNumber, you can also use button names like primary for 0 or secondary for 2. If you don't put any button number or button name, it defaults to 0.

if(Poin.wasJustPressed("primary")) player.shoot()
if(Poin.wasJustPressed("secondary")) player.reload()

License

This project is licensed under the MIT license.

3.0.0

7 months ago

2.2.0

3 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago