Blob Layer
data class BlobLayer(val color: Color = Color.White, val brush: Brush? = null, val alpha: Float = 1.0f, val segments: Int = 6, val amplitude: ClosedRange<Dp> = (-4).dp..4.dp, val tempo: Float = 1.0f, val rotation: Float = 0.0f, val spin: Float = 0.0f, val blur: Dp = 0.dp, val blendMode: BlendMode = BlendMode.SrcOver, val strokeWidth: Dp = 0.dp, val visible: Boolean = true, val seed: Int? = null)(source)
One morphing outline drawn by Blob.
The layer starts from the blob's shape and pushes every point of the outline along its normal. segments control points sit at equal distances around the outline. Each one moves on its own smooth, seeded curve inside amplitude, and the outline between two control points follows a smooth curve through them. A layer with an amplitude of 0.dp..0.dp is the plain shape, which is how you draw a solid, still body under or over the moving layers.
Constructors
Link copied to clipboard
constructor(color: Color = Color.White, brush: Brush? = null, alpha: Float = 1.0f, segments: Int = 6, amplitude: ClosedRange<Dp> = (-4).dp..4.dp, tempo: Float = 1.0f, rotation: Float = 0.0f, spin: Float = 0.0f, blur: Dp = 0.dp, blendMode: BlendMode = BlendMode.SrcOver, strokeWidth: Dp = 0.dp, visible: Boolean = true, seed: Int? = null)
Properties
Link copied to clipboard
How far the outline can move from the shape, along the outward normal. Negative values move inward. (-3).dp..5.dp lets the outline dip 3 dp in and bulge 5 dp out.
Link copied to clipboard
0 fills the layer. Above 0 draws only its outline, this thick, centered on the moving outline.