Skip to content

Support multiple joysticks#37

Merged
bobboteck merged 1 commit intobobboteck:masterfrom
brollin:multi-joystick-support
Nov 24, 2023
Merged

Support multiple joysticks#37
bobboteck merged 1 commit intobobboteck:masterfrom
brollin:multi-joystick-support

Conversation

@brollin
Copy link
Copy Markdown
Contributor

@brollin brollin commented Jun 29, 2022

I saw the other pull request for fixing this same problem, but I think this solution may be cleaner.

Support multiple joysticks by saving the ID of the touch point when a canvas is touched. Then when a touch is ended anywhere in the document, each joystick compares the ended touch ID with the touch ID associated with its canvas to know whether to honor that touch end event.

By the way, didn't see a way to generate the minified JS. Would recommend including a command to do so somewhere, perhaps as a npm script.

Support multiple joysticks by saving the ID of the touch point when a
canvas is touched. Then when a touch is ended anywhere in the document,
each joystick compares the ended touch ID with the touch ID associated
with its canvas to know whether to honor that touch end event.
@nguterresn
Copy link
Copy Markdown

nguterresn commented Dec 22, 2022

Absolutely agree with you. This one looks like an easy and clean fix.

Is anyone maintaining this repo? Would like to fix this officially on my side as well!

They probably use this website to minify the js code.

@topkat
Copy link
Copy Markdown

topkat commented Nov 22, 2023

@bobboteck any plans on merging this ? This would be very helpful :)

@bobboteck bobboteck merged commit 7be970e into bobboteck:master Nov 24, 2023
@bobboteck
Copy link
Copy Markdown
Owner

@top-kat @nguterresn @brollin sorry for late merge, but I'm too busy in this period of my life, can you test if all is ok?

@topkat
Copy link
Copy Markdown

topkat commented Nov 24, 2023

Tested everything is working fine :) Thanks a lot @bobboteck and good luck to handle everything ;)

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

Successfully merging this pull request may close these issues.

4 participants