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

#1 Fix a problem where plasma effect did not stop. #12

Merged
merged 1 commit into from Jan 10, 2022

Conversation

twenty3
Copy link
Collaborator

@twenty3 twenty3 commented Jan 8, 2022

Sometimes the plasma effect will not stop rendering when the mouse is moved outside the notched area. Having a second display arranged above the notched laptop screen so that the cursor can exit the notch from the top side seems to be a (or the only) way to produce the problem.

Debugging indicates that even though the expected mouseExited(at:underNotch:) method is called on PlasmaEffect, setting the emitterCell.birthRate to zero is not sufficient to stop the cell from rendering. Making sure to also update the plasmaLayer.emitterPosition value seems to be enough to get the birth rate change to take hold. This indicates that there is something unexpected happening in the emitterCell / Layer, which makes me think I'm just overlooking something. This does seem to work though and seems a safe change to make.

Sometimes the plasma effect will not stop rendering when the mouse moved is moved outside the notched area. Having a second display arranged above the notched laptop screen so that the cursor can exit the notch from the top side seems to be a (or the only) way to produce the problem.

Debugging indicates that even though the expected `mouseExited(at:underNotch:)` method is called on `PlasmaEffect`, setting the `emitterCell.birthRate` to zero is not sufficient to stop the cell from rendering. Making sure to also update the `plasmaLayer.emitterPosition` value seems to be enough to get the birth rate change to take hold. This indicates that there is something unexpected happening in the emitterCell / Layer, which makes me think I'm just overlooking something. This does seem to work though and seems a safe change to make.
Copy link
Collaborator

@danielpunkass danielpunkass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the fix for the other issue with exiting out the top of the notch has been fixed, I don't see an easy way to reproduce this, but I agree it seems innocuous to reset the point in case that helps in any remaining edge cases.

Copy link
Owner

@chockenberry chockenberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chockenberry chockenberry merged commit 6ed328c into main Jan 10, 2022
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.

None yet

3 participants