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

Partially visibile confetti are not drawn #330

Open
mattprecious opened this issue Jul 9, 2024 · 0 comments
Open

Partially visibile confetti are not drawn #330

mattprecious opened this issue Jul 9, 2024 · 0 comments

Comments

@mattprecious
Copy link
Contributor

mattprecious commented Jul 9, 2024

For a more natural rain effect where the confetti do not suddenly appear in frame, I move the position slightly outside of the view bounds:

Position.Absolute(-50f, -50f).between(Position.Absolute(width + 50f, -50f))
// Or...
Position.Relative(-0.1, -0.1).between(Position.Relative(1.1, -0.1))

This worked in 1.x, but does not with 2.x. The confetti is marking whether it should be drawn based off of whether its location is inside the draw area:

drawParticle = drawArea.contains(location.x.toInt(), location.y.toInt())

For confetti that is slightly off screen, this evaluates to false, so the confetti does not draw until it is entirely in frame, which maintains the sudden appearance that I'm trying to avoid.

I assume the fix here is to incorporate width into the bounds check, but wanted to open this issue before attempting to fix myself.

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