Skip to content

Releases: PiotrPrus/ParticleEmitter

v1.1.0 — Compose Multiplatform

08 Jun 07:07
74b0bf1

Choose a tag to compare

ParticleEmitter is now a Compose Multiplatform library. The same physics-based particle API runs on Android, JVM desktop, iOS, macOS, and the web (JS/Wasm) — no longer Android-only.

Huge thanks to @zsmb13 for the migration (#19) — the project's first external contribution. 🎉

Changes

  • Kotlin / Compose Multiplatform. The library now targets Android, JVM (desktop), iOS (arm64 + simulator), macOS, JS, and Wasm. Dependencies moved from AndroidX Compose to JetBrains Compose (org.jetbrains.compose.*).
  • Library code relocated to commonMain. Platform-specific calls were replaced with multiplatform-safe equivalents (Dispatchers.Default instead of Dispatchers.IO, frame-based particle timestamps instead of System.nanoTime()). No public API changes to the emitter or config types.
  • Samples restructured into samples/{androidApp, shared, desktopApp, webApp, iosApp} — runnable demos for every supported platform.
  • CI added to build the library and samples across all targets.

Requirements

  • Build with JDK 21 and a recent Kotlin/Compose toolchain. On Android, Compose Multiplatform stays binary-compatible with AndroidX Compose.

Install

implementation("io.github.piotrprus:particle-emitter:1.1.0")

v1.0.5 — Text & Ring emitters

22 Apr 04:59
cc4eff2

Choose a tag to compare

Two new config knobs plus sample screens demonstrating them.

Changes

  • ParticleShape.Text(text, textStyle, textMeasurer) — new shape variant. The text is rasterized once into an ImageBitmap and drawn as a texture on every frame, so hundreds of text/emoji particles stay smooth.
  • CanvasEmitterConfig.hideInStartRegion — when true, particles currently inside the start region are not drawn. Pairs with Shape.OVAL + 360° spread to keep the ring interior clean.
  • New EmojiRain sample — emojis falling from the top with a live slider and a 3-second burst button.
  • New RingEmitter sample — ring emitter with a toggle for the new hide flag.

Install

implementation("io.github.piotrprus:particle-emitter:1.0.5")

v1.0.4 — Performance

21 Apr 11:37
92d85ec

Choose a tag to compare

Performance-focused release — reduces allocation pressure and skips unnecessary draws. No API changes.

Changes

  • Cache per-particle animation configs to cut allocation pressure
  • Skip draw when particle is fully transparent or scaled to zero
  • Drop unused id field from CanvasParticle (internal)
  • New Benchmark and SingleEmitterBenchmark sample screens
  • New MagicWand sample — drag emitter with world-space star trails
  • PERFORMANCE.md with measured particle budgets per target FPS
  • Sample menu converted to LazyColumn
  • README media optimized (~88% smaller gifs)

Install

implementation("io.github.piotrprus:particle-emitter:1.0.4")

v1.0.3 — Edge Behaviors

19 Apr 20:00

Choose a tag to compare

Adds EdgeBehavior configuration to CanvasEmitter, letting particles bounce, stick, or wrap at canvas boundaries (in addition to the default "none" behavior).

Changes

  • New EdgeBehavior API (None, Bounce, Stick, Wrap)
  • CanvasEmitterConfig gains an edgeBehavior parameter
  • StickyEdges sample screen demonstrating each mode
  • README updated with edge behavior docs and demo GIF

Install

implementation("io.github.piotrprus:particle-emitter:1.0.3")

v1.0.2

17 Apr 12:15

Choose a tag to compare

What's New

Configurable directional gravity for particles

Both ParticlesEmitter and CanvasParticleEmitter now support directional gravity via two new parameters:

  • gravityStrength — strength of gravitational force (Dp/s²). 0 = no gravity.
  • gravityAngle — direction of gravity in degrees. 0 = down, 180 = up, -90 = right, 90 = left.

This enables effects like falling confetti, rain, rising bubbles, wind, and diagonal forces.

CanvasParticleEmitter — physics-based motion

The canvas emitter now uses real physics (velocity + acceleration) instead of tween interpolation. Particles follow natural arcs when gravity is applied.

Sample app improvements

  • New Gravity sample with on/off toggle
  • New Gravity Point sample with draggable attractor and force slider
  • Screens extracted to separate files under screen/ package
  • Fixed edge-to-edge status bar padding

Breaking Changes

  • EmitterConfig.gravityMultiplier → replaced by gravityStrength: Float + gravityAngle: Int
  • CanvasEmitterConfig.flyDistancesDp → renamed to initialForce: IntRange
  • CanvasEmitterConfig.translateEasing → removed (physics replaces tween for position)

Migration from 1.0.1

// Before (1.0.1)
EmitterConfig(gravityMultiplier = 0.5f, ...)

// After (1.0.2)
EmitterConfig(gravityStrength = 0.5f, gravityAngle = 0, ...)
// Before (1.0.1)
CanvasEmitterConfig(flyDistancesDp = IntRange(40, 100), translateEasing = FastOutSlowInEasing, ...)

// After (1.0.2)
CanvasEmitterConfig(initialForce = IntRange(40, 100), ...)

Installation

implementation("io.github.piotrprus:particle-emitter:1.0.2")

v1.0.1

16 Apr 11:58

Choose a tag to compare

What's new

  • Smooth config updates — Changing emitter parameters (e.g. birth rate) no longer restarts the animation. Config is read reactively each frame via rememberUpdatedState.
  • Frame-delta particle spawning — Replaced interval-based emission with frame-delta accumulation for accurate, smooth birth rates.
  • Reactive remember keysremember and LaunchedEffect in ParticlesEmitter and MultiEmitter now properly react to config changes.
  • Sample app overhaul — Navigation between demos, interactive birth rate slider for the canvas emitter.

Installation

dependencies {
    implementation "io.github.piotrprus:particle-emitter:1.0.1"
}

Available on Maven Central.