Skip to content

Releases

v2.2.0

Choose a tag to compare

@DanielMartinus DanielMartinus released this 18 Oct 17:13

New

  • (#327) Added stars, triangles and diamonds Shape.Polygon.STAR, Shape.Polygon.TRIANGLE and Shape.Polygon.DIAMOND spin and flip just like the other shapes. Make a star with more points with Shape.Polygon.star(points = 6), or draw your own polygon from points. Thanks to @patxibocos for the triangle that got this started
  • Respect "Remove animations" in the accessibility settings. rememberReduceMotion() in Compose and KonfettiView.isReduceMotionEnabled(context) for views tell you when it's on, so you can skip the confetti. Nothing changes unless you check it

Heads up: Shape is a sealed interface, so if you have an exhaustive when (shape) in your own code, it needs a branch for Shape.Polygon now.

v2.1.0

Choose a tag to compare

@DanielMartinus DanielMartinus released this 17 Oct 14:34

New

  • (#305) Starting confetti from a button in Compose is finally easy. rememberKonfettiState() gives you start, burst(at = offset), stopGracefully and reset, and you pass it to KonfettiView(state = ...). No more key() or repeat tricks. Thanks to @zoltish for asking and @svenjacobs for the idea to burst where the user taps
  • KonfettiView(state = ...) takes an onPartyEnded = { activeParties -> } lambda that's called once for every party that finishes

Changed

  • (#320) KonfettiView(parties = ...) now starts over when the list of parties changes. Before, it only ever played the first list it got. Thanks to @behu-kea for reporting this

Heads up: the parties are compared with equals, so if you build them inside a composable, wrap them in remember. A party with a drawable you load with getDrawable(...) on every recomposition counts as new each time and would restart. Parties with squares, circles and rectangles are fine.

Other

  • The size and speed of the confetti follow LocalDensity, so they match the rest of your Compose UI on other displays and in previews
  • The Compose sample uses the new state API, tap anywhere for a burst

v2.0.8

Choose a tag to compare

@DanielMartinus DanielMartinus released this 17 Oct 13:21

Fixes

  • (#304, #269) Emitter.max() with an amount bigger than the duration in milliseconds rounded down to an endless burst and could run the app out of memory. It now never creates more than the max you set. Thanks to @NKosyanchuk and @HolyShot for reporting it and @tim4724 for finding the cause
  • (#297) Fix the crash on API 21 and 22 when the XML KonfettiView shows up. Thanks to @ouchadam for reporting it
  • (#337) konfetti-compose and konfetti-xml can be used in the same app again. The shared image classes now live in a new konfetti-image artifact that comes in automatically, and your imports stay the same. Thanks to @spinkarad for reporting it
  • (#330) Confetti is drawn as long as any part of it is on screen, so pieces no longer pop in at the edges. Thanks to @mattprecious for reporting it
  • In Compose, onParticleSystemEnded now fires once per party instead of every frame, and KonfettiView stops requesting frames when it's done

Other

  • The XML view caps one frame at 100ms too, the same as Compose
  • Using the same drawable with and without tint no longer leaks the tint into the other shape

v2.0.7

Choose a tag to compare

@DanielMartinus DanielMartinus released this 16 Oct 14:39

Fixes

  • (#349) Sometimes when you background the app while confetti is still spawning in Compose, coming back treats the whole pause as one frame. With 50 particles a second, a minute away tries to create about 3000 particles at once. That can freeze the app or run out of memory. The saved frame time is now cleared when the view resumes, and one frame is capped at 100ms so a stall can't dump the whole party either.

Thanks to @mekutluca and @PaulKlauser for raising this (#340, #341, #342)

Other

  • The license name in the published POM is now ISC, so Maven and Licensee can recognize it. Thanks to @rodgavila and @eygraber for raising this (#339, #344)
  • PartySystem can take a Random. The old constructor still works, and a seeded one creates the same particles every time

v2.0.6

Choose a tag to compare

@DanielMartinus DanielMartinus released this 16 Oct 10:57

No API changes in this release. I bumped the build tooling so Konfetti can keep being published. The project was still on an old Gradle, AGP and Kotlin setup, and the old Sonatype OSSRH host is no longer around.

Other

  • Upgrade Gradle to 9.6, AGP to 9.4.1 and Kotlin from 1.8.10 to 2.4.21

v2.0.5

Choose a tag to compare

@DanielMartinus DanielMartinus released this 28 Nov 08:39

Fixes

  • (#333) and issue #306 Replace withFrameMillis with withInfiniteAnimationFrameMillis - fixes instrumentation tests with Konfetti-compose implementation in them (Idling resource timed out: possibly due to compose being busy.)

Thanks to @crowleysimon and @lupuuss for investigating this issue and @matthewbartos for getting it on my radar

v2.0.4

Choose a tag to compare

@DanielMartinus DanielMartinus released this 10 Dec 22:08

Fixes

  • (#319) Fix rendering by dynamically updating FPS instead of locking it to 60fps. Phones that had a refresh rate of 120hz experienced a rendering speed that was two times faster. The experience should now be consistent across different frame rates.

v2.0.3

Choose a tag to compare

@DanielMartinus DanielMartinus released this 14 Jul 21:23

Fixes

  • (#309) Introducing applyAlpha to turn off Alpha for DrawableShapes. This fixes an issue for non-tinted (DrawableShape, tint = false) when alpha is applied. by @laurentyhuel.
  • (#301) Fixing an alpha issues for DrawableShapes in the compose SDK causing them to flicker. @dostalleos

Other

v2.0.2

Choose a tag to compare

@DanielMartinus DanielMartinus released this 20 Feb 12:12

Fixes

  • (#287) Lower minSdk for konfetti-compose to api 21
  • (#288) Fix Out of Memory exception by @PaulKlauser
  • (#295) Improve transitive dependency setup

v2.0.1

Choose a tag to compare

@DanielMartinus DanielMartinus released this 02 Jan 09:43
e519dff

This is a patch for the 2.0.0 release. Core classes weren't exposed making the library unusable and it includes some other small fixes that shouldn't have end up in a release.

Fixes

  • (#284) Include core classes in konfetti-xml and konfetti-compose. Thanks @GhislainVerrier for reporting the issue
  • (2878993) Remove log from core library
  • (2da7554) Remove unused compose dependencies and replace them with foundation 8822323
⌂ 换网址