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

feature: Presets for typical controller layouts #8

Open
GDur opened this issue Jan 19, 2025 · 3 comments
Open

feature: Presets for typical controller layouts #8

GDur opened this issue Jan 19, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@GDur
Copy link
Collaborator

GDur commented Jan 19, 2025

Could be done via

new Gamepad({ type: 'n64'})

Or we could just add a these "layouts/presets" as example code which makes it easy to copy.

@GDur GDur added the enhancement New feature or request label Jan 19, 2025
@GDur GDur changed the title Presets for typical controller layouts feature: Presets for typical controller layouts Jan 21, 2025
@GDur
Copy link
Collaborator Author

GDur commented Jan 26, 2025

Maybe "layout" is a better property name

new Gamepad({ layout: 'n64'})

@rokobuljan
Copy link
Owner

rokobuljan commented Jan 26, 2025

I think "layout" is more like a predefined set of already specifically positioned joystick/s and button/s.
Perhaps "theme"?
Or is that ("layout") exactly what you mean?
In such case, yes, "layout" is perfect

@GDur
Copy link
Collaborator Author

GDur commented Jan 26, 2025

I think "layout" is more like a predefined set of already specifically positioned joystick/s and button/s.

I mean that if you use this eg. layout then it would produce a gampad with similar to this one

Image

And for eg:

new Gamepad({ layout: 'super intendo'})

Image

'theme' could be nice too, or we just call it 'preset'

But as I said before

Or we could just add a these "layouts/presets" as example code which makes it easy to copy.

So we really just add some preset json objects in the docs/examples/markdown for the dev to copy. (the more it think about it I tend to favor this solution)
And then maybe Gamepad.loadFromJson(...)

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

When branches are created from issues, their pull requests are automatically linked.

2 participants