Conversation
|
Hi! Great suggestion! Alternatively, we could even use two parameters: one for the starting point of fading and another for the endpoint where the alpha reaches 0. Possible names could be For example, if: fadeStartThreshold = 0.5f
fadeEndThreshold = 0.8fThe snowflakes would start fading at the middle of the canvas height and become fully transparent at 80% of the canvas height. |
|
Oh, yes, the first option looks smarter than the way I did it. I'm implementing it now |
|
Everything is ready. It seems to me a good solution to use For exaplme with |
|
Great idea! 2024-12-13.15.46.48.mov |
|
Truth. I didn't notice it on the dim screen. I think it's bad idea to remove this, since this way the fading begins to look unnatural, however, I solved the problem. |
snowfall-compose/src/commonMain/kotlin/io/github/skeptick/snowfall/compose/Snowfall.kt
Outdated
Show resolved
Hide resolved
...compose/src/commonMain/kotlin/io/github/skeptick/snowfall/compose/internal/SnowflakeState.kt
Outdated
Show resolved
Hide resolved
|
It’s also necessary to apply 2024-12-13.23.16.43.mov |

I think it should be useful in this library. Added the fading parameter, which determines that snowflakes should smoothly disappear.