Bounce

data class Bounce(val damping: Float = 0.7f) : EdgeBehavior(source)

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

Parameters

damping

fraction of velocity retained after each bounce. 1.0 = perfect elastic bounce, 0.5 = half the speed after each bounce. Must be in range 0, 1.

Constructors

Link copied to clipboard
constructor(damping: Float = 0.7f)

Properties

Link copied to clipboard