Uh oh!
There was an error while loading. Please reload this page.
Fix particles not fully fading away - #75
Merged
Merged
Conversation
MajorBreakfast
commented
Nov 9, 2019
ContributorAuthor
@chabou Hey 🙂Could you maybe have a look it this PR? It changes only 6 lines of code 😁 |
sanderdsz
commented
Nov 12, 2019
I'm having this same issue, hope they merge this PR to fix this, looking forward. |
chabou
approved these changes
Nov 12, 2019
MajorBreakfast
commented
Nov 23, 2019
ContributorAuthor
@timneutkens Could you merge this? |
Bman243
commented
Nov 25, 2019
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 |
MajorBreakfast
commented
Nov 25, 2019
ContributorAuthor
@Boo-Man Yes, you can update the file directly under |
Bman243
commented
Nov 25, 2019
@MajorBreakfast Perfect, thank you! |
jezmck
commented
Aug 12, 2021
Who can merge this, only @MajorBreakfast? |
chabou
commented
Aug 16, 2021
Contributor
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 freeto 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.