Fix particles not fully fading away#75
Merged
chabou merged 1 commit intovercel:masterfrom Aug 16, 2021
Merged
Conversation
Contributor
Author
|
@chabou Hey 🙂Could you maybe have a look it this PR? It changes only 6 lines of code 😁 |
|
I'm having this same issue, hope they merge this PR to fix this, looking forward. |
chabou
approved these changes
Nov 12, 2019
Contributor
Author
|
@timneutkens Could you merge this? |
|
Hey, I'm kind of a newbie at this - is there any way I can apply the updated index.js in the meantime? I don't know how to change the files if I do |
Contributor
Author
|
@Boo-Man Yes, you can update the file directly under |
|
@MajorBreakfast Perfect, thank you! |
|
Who can merge this, only @MajorBreakfast? |
Collaborator
|
I can try to merge and release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current algorithm for drawing the particles reduces the particle opacity in each frame and removes any particles from the array that fall under a certain opacity threshold. The animation loop stops once there are no more particles to draw. It however happens that the last particles are not fully transparent on the last frame that is drawn. Since this frame stays visible, slightly visible ghost particles are left on screen.
This PR tweaks the algorithm so that the particles whose opacity falls under the min threshold are not drawn at all. This ensures that the last drawn frame contains no slightly visible particles.