fenomas / game-inputs

A simple module for abstracting key/mouse input for games. Demo:
http://fenomas.github.io/game-inputs/
21 stars 6 forks source link

Thinking of adding game pads to this logic #4

Closed terrac closed 2 years ago

terrac commented 4 years ago

Seems like it would be easy and a nice thing to have.

fenomas commented 4 years ago

Hey, this would be great!

If possible, I guess stick to the current API - so buttons would map to vkey-style codes (<gamepad 1> or whatever?), and axes would be handled like mouse input. Maybe state.axes[0].dx / dy?

But I haven't looked at it carefully, maybe something else makes more sense.