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

Update for PIXI 7+ #7

Closed
wants to merge 1 commit into from
Closed

Update for PIXI 7+ #7

wants to merge 1 commit into from

Conversation

reececomo
Copy link

Enables support for PIXI 7+ and fixes #6

This is a breaking change, so might want to consider releasing as a new major version?

👍

@Azaeres
Copy link

Azaeres commented Mar 23, 2023

Thanks for the PR!

One issue I've found with this update is that the joystick behavior isn't exactly the same. Before, onDragMove would track all over the screen. Now, it tracks only when your finger/thumb is over the joystick element. This could lead to a frustrating playing experience.

Is that your experience too? Any suggestions?

@reececomo
Copy link
Author

I didn't realise that was desirable - for our game we actually only want it to track when its over the joystick (like a real one).

I'll leave this PR up as a reference and feel free to make any changes 👍

@Azaeres
Copy link

Azaeres commented Mar 27, 2023

Sorry, I found this behavior a bit hard to describe. I mean that in the previous version you tap directly onto the joystick like you're saying, but then are able to drag off the joystick, even to the edges of the screen, and the joystick will still be tracking in real-time. In this version (as well as in my own tests), the tracking stops at the edge of the joystick element.

My understanding is that Pixi 7 changed the way events propagate in order to make it more consistent with the way events propagate in the DOM, so it does make sense that this behavior would be affected. My guess is that, to make the two versions behave the same, the event handling might need to happen at a higher level than the joystick itself.

@reececomo
Copy link
Author

That doesn't appear to happen for me 👍 Although I'm using a slight fork of this code.

@reececomo reececomo closed this Apr 6, 2023
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.

Cannot invoke constructor?
2 participants