Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unified api for controllers #1

Open
freeman-lab opened this issue Jan 25, 2016 · 1 comment
Open

unified api for controllers #1

freeman-lab opened this issue Jan 25, 2016 · 1 comment

Comments

@freeman-lab
Copy link
Contributor

In hexaworld-core we need to assume the provided controller will conform to a particular API, which so far means the minimal requirement that it has a keysDown property. Already, this works for crtrdg-keyboard and crtrdg-tty but not crtrdg-touch (due to a naming difference). It'd be really cool to define a common API for controllers, maybe as a test suite, and then here just assume we're using one of them. Can probably move the conversation to one of the controller repos.

cc @sethvincent

@freeman-lab
Copy link
Contributor Author

One idea, at least for the keysDown / down property: how about replacing it with input, so that way it's touch.input, keyboard.input, and tty.input, all of which seem pretty reasonable?

The events are still different, namely keyDown and keyUp for the keyboard-related ones and tap... and swipe... for touch. But maybe those could be switched to inputOn and inputOff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant