EdgeBehavior

sealed class EdgeBehavior(source)

Defines how particles behave when they reach the boundary of the emitter's composable.

Inheritors

Types

Link copied to clipboard
data class Bounce(val damping: Float = 0.7f) : EdgeBehavior

Particles bounce off edges, reversing their velocity component perpendicular to the boundary.

Link copied to clipboard
data object None : EdgeBehavior

Particles pass through edges freely and disappear off-screen. This is the default behavior.

Link copied to clipboard
data object Stick : EdgeBehavior

Particles stop at the edge and remain there for the rest of their lifespan. Velocity is zeroed on contact with the boundary.

Link copied to clipboard
data object Wrap : EdgeBehavior

Particles that exit one edge reappear on the opposite edge, maintaining their velocity.