### Canvas Emitter Config for Rising Bubbles Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Example of CanvasEmitterConfig for rising bubbles, using upward gravity. ```kotlin CanvasEmitterConfig( gravityStrength = 50f, gravityAngle = 180, // up // ... ) ``` -------------------------------- ### Multi Emitter Configuration for Sequential Bursts Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Configure the MultiEmitter to create sequential bursts of particles. This example defines the number of emitters, delay between them, and particle configuration. ```kotlin MultiEmitter( modifier = Modifier.fillMaxSize(), emitterCount = 5, emitterDelay = 200L, emitterConfig = EmitterConfig( particlesCount = 20, particleLifespanMillis = 1500L, ) { Box( modifier = Modifier .size(8.dp) .background(Color.White, CircleShape) ) } ) ``` -------------------------------- ### Canvas Emitter Configuration Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Configure the CanvasParticleEmitter for high-performance particle effects. This example sets up particle emission rate, shape, color, and blend mode. ```kotlin CanvasParticleEmitter( modifier = Modifier.fillMaxSize(), config = CanvasEmitterConfig( particlePerSecond = 50, emitterCenter = DpOffset(200.dp, 400.dp), startRegionShape = CanvasEmitterConfig.Shape.POINT, startRegionSize = DpSize(0.dp, 0.dp), particleShapes = listOf(ParticleShape.Circle), lifespanRange = 800..1200, fadeOutTime = 600..1000, scaleTime = 800..1200, colors = listOf(Color.Cyan, Color.Magenta, Color.Yellow), particleSizes = listOf(DpSize(8.dp, 8.dp), DpSize(12.dp, 12.dp)), spread = IntRange(-90, 90), blendMode = BlendMode.Screen, initialForce = IntRange(50, 150), ) ) ``` -------------------------------- ### Canvas Emitter Config for Falling Confetti Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Example of CanvasEmitterConfig for falling confetti, utilizing downward gravity. ```kotlin CanvasEmitterConfig( gravityStrength = 120f, gravityAngle = 0, // down spread = IntRange(-45, 45), initialForce = IntRange(80, 160), // ... ) ``` -------------------------------- ### Canvas Emitter Config for Wind Effect Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Example of CanvasEmitterConfig simulating a wind effect, with gravity pushing particles to the right. ```kotlin CanvasEmitterConfig( gravityStrength = 80f, gravityAngle = -90, // right // ... ) ``` -------------------------------- ### Compose Emitter Configuration with Custom Particles Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Configure the ParticlesEmitter for custom composable particle content. This example uses a Text composable as the particle. ```kotlin ParticlesEmitter( config = EmitterConfig( particlesCount = 30, emitDurationMillis = 1000L, particleLifespanMillis = 2000L, initialForce = 80, gravityStrength = 1f, gravityAngle = 0, // 0 = down spread = IntRange(-45, 45), ) { // Any @Composable content as a particle Text("✨", fontSize = 20.sp) } ) ``` -------------------------------- ### Configuring a Clean Ring Emitter Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Prevents particles from being drawn if they are currently inside the start region, useful for ring-shaped emitters to keep the center clean. Particles still exist and move but are invisible within this region. ```kotlin CanvasEmitterConfig( startRegionShape = CanvasEmitterConfig.Shape.OVAL, startRegionSize = DpSize(180.dp, 180.dp), spread = IntRange(0, 360), hideInStartRegion = true, // ... ) ``` -------------------------------- ### Capture gfxinfo for Performance Analysis Source: https://github.com/piotrprus/particleemitter/blob/main/PERFORMANCE.md Use `adb shell dumpsys gfxinfo` to capture detailed performance metrics for a given package. Reset the counters before capturing a specific time window. ```bash adb shell dumpsys gfxinfo reset # wait 10 seconds adb shell dumpsys gfxinfo ``` -------------------------------- ### Configuring Particles to Stick to Edges Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Particles stop at the edge and remain there for the rest of their lifespan. This behavior is useful for creating static elements at boundaries. ```kotlin CanvasEmitterConfig( edgeBehavior = EdgeBehavior.Stick, // ... ) ``` -------------------------------- ### Defining an Image Particle Shape Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Uses an ImageBitmap to define the particle's shape, allowing for custom graphics. Supports tinting for color variations. ```kotlin ParticleShape.Image(ImageBitmap.imageResource(R.drawable.star)) ``` -------------------------------- ### Configure Maven Central Repository Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Ensure mavenCentral() is included in your project's repositories to resolve the ParticleEmitter dependency. ```groovy repositories { mavenCentral() } ``` -------------------------------- ### Configuring Particles to Wrap Around Edges Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Particles exiting one edge reappear on the opposite side, creating a continuous loop effect. This is suitable for infinite scrolling or seamless background effects. ```kotlin CanvasEmitterConfig( edgeBehavior = EdgeBehavior.Wrap, // ... ) ``` -------------------------------- ### Add ParticleEmitter Dependency (Groovy) Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Add this dependency to your module's build.gradle file to include the ParticleEmitter library. ```groovy dependencies { implementation "io.github.piotrprus:particle-emitter:1.0.5" } ``` -------------------------------- ### Configuring Bouncing Particles Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Particles reflect off edges with a specified damping factor. Damping controls the velocity retained per bounce. ```kotlin CanvasEmitterConfig( edgeBehavior = EdgeBehavior.Bounce(damping = 0.7f), // ... ) ``` -------------------------------- ### Defining a Custom Path Particle Shape Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Allows particles to take on a custom shape defined by a Path object. This offers maximum flexibility for particle design. ```kotlin ParticleShape.PathShape(myCustomPath) ``` -------------------------------- ### Add ParticleEmitter Dependency (Kotlin DSL) Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Add this dependency to your module's build.gradle file using Kotlin DSL for the ParticleEmitter library. ```kotlin dependencies { implementation("io.github.piotrprus:particle-emitter:1.0.5") } ``` -------------------------------- ### Defining a Text Particle Shape Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Renders text, such as emojis or regular characters, as the particle shape. Requires a TextMeasurer for accurate sizing and positioning. ```kotlin ParticleShape.Text( text = "🎉", textStyle = TextStyle(fontSize = 20.sp), textMeasurer = rememberTextMeasurer(), ) ``` -------------------------------- ### Defining a Circle Particle Shape Source: https://github.com/piotrprus/particleemitter/blob/main/README.md Specifies a simple circular shape for particles. This is the most basic particle shape available. ```kotlin ParticleShape.Circle ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.