DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.13k stars 300 forks source link

added method to expose gravity control. #237

Closed akashraghav closed 3 years ago

akashraghav commented 3 years ago

Hey @DanielMartinus

added method to expose vertical/bottom gravity control. I think this would be helpful in controlling the momentum of the confettis with higher speeds, so that they don't just jump out of screen, when burst in upward direction. Kept the defaults same.

I'm also thinking to work on gravity control on x-axis, to allow change in gravity direction as well. let me know what you think.

DanielMartinus commented 3 years ago

@akashraghav thank you for your contribution. Could you run ./gradlew spotlessApply to make sure the CI succeeds?

akashraghav commented 3 years ago

@akashraghav thank you for your contribution. Could you run ./gradlew spotlessApply to make sure the CI succeeds?

I did this earlier and pushed the change reported in log, you can view diff konfetti/src/main/java/nl/dionsegijn/konfetti/Confetti.kt but the CI check is still reporting same issue. While, I'm getting build success locally on both ./gradlew spotlessCheck and ./gradlew spotlessApply calls. Is there a way to trigger check again?

./gradlew spotlessCheck

> Configure project :demo-google-play
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

BUILD SUCCESSFUL in 4s
5 actionable tasks: 5 executed
./gradlew spotlessApply

> Configure project :demo-google-play
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

BUILD SUCCESSFUL in 926ms
5 actionable tasks: 1 executed, 4 up-to-date
DanielMartinus commented 3 years ago

You're right, something is wrong with Spotless. I got it fixed locally but the CI keeps throwing the same error even though the formatting is correct. I'll let you know once its fixed

DanielMartinus commented 3 years ago

Figured it out. The CI is running the workflow in pull_request_target mode. I had to configure the workflow like that so it would also run for forked pull request like this. However, unfortunately it will take the base branch (master) and run spotless on that branch. I'll have to find a fix for that but for now it's fixed if you merge master into your PR.

akashraghav commented 3 years ago

Seems, I did something wrong, I'll close this and create a new PR.

DanielMartinus commented 3 years ago

@akashraghav no need for that, I fixed it for you

DanielMartinus commented 3 years ago

Thanks for your contribution @akashraghav