-
- All Implemented Interfaces:
public final class Size
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSize.Companion
-
Method Summary
Modifier and Type Method Description final IntegergetSizeInDp()the size of the confetti in dip final FloatgetMass()each size can have its own mass for slightly different behavior. final FloatgetMassVariance()create slight randomness how particles react to gravity. -
-
Method Detail
-
getSizeInDp
final Integer getSizeInDp()
the size of the confetti in dip
-
getMass
final Float getMass()
each size can have its own mass for slightly different behavior. For example, the closer the mass is to zero the easier it will accelerate but the slower it will will fall down due to gravity.
-
getMassVariance
final Float getMassVariance()
create slight randomness how particles react to gravity. This variance is a percentage based on mass. The higher the variance the bigger the difference in mass between each particle is. Default is 0.2f for a slight difference in mass for each particle.
-
-
-
-