RainDslReceiver

This Interface contains all the functions that will be exposed to Koltin DSL.

Separated the DSL receiver class to this interface to avoid IDE code suggestion for property getters.

Functions

Link copied to clipboard
abstract fun centerThinning(centerThinning: Expression): Rain
abstract fun centerThinning(centerThinning: Double = 0.57): Rain

Thinning factor of rain particles from center. 0 - no thinning. 1 - maximal central area thinning. Default value: 0.57. Value range: 0, 1

Link copied to clipboard

Set the CenterThinning property transition options.

Link copied to clipboard
abstract fun color(color: Expression = Expression.fromRaw("""["interpolate",["linear"],["measure-light","brightness"],0,"#03113d",0.3,"#a8adbc"]""".trimIndent())): Rain
abstract fun color(@ColorInt color: Int): Rain
abstract fun color(color: String): Rain

Individual rain particle dorplets color. Default value: "["interpolate","linear","measure-light","brightness",0,"#03113d",0.3,"#a8adbc"]".

Link copied to clipboard

Set the Color property transition options.

Link copied to clipboard
abstract fun density(density: Expression = Expression.fromRaw("""["interpolate",["linear"],["zoom"],11,0,13,0.5]""".trimIndent())): Rain
abstract fun density(density: Double): Rain

Rain particles density. Controls the overall screen density of the rain. Default value: "["interpolate","linear","zoom",11,0,13,0.5]". Value range: 0, 1

Link copied to clipboard

Set the Density property transition options.

Link copied to clipboard
abstract fun direction(direction: Expression): Rain
abstract fun direction(direction: List<Double> = listOf(0.0, 80.0)): Rain

Main rain particles direction. Azimuth and polar angles. Default value: 0,80. Value range: 0, 360

Link copied to clipboard

Set the Direction property transition options.

Link copied to clipboard
abstract fun distortionStrength(distortionStrength: Expression): Rain
abstract fun distortionStrength(distortionStrength: Double = 0.7): Rain

Rain particles screen-space distortion strength. Default value: 0.7. Value range: 0, 1

Link copied to clipboard

Set the DistortionStrength property transition options.

Link copied to clipboard
abstract fun dropletSize(dropletSize: Expression): Rain
abstract fun dropletSize(dropletSize: List<Double> = listOf(2.6, 18.2)): Rain

Rain droplet size. x - normal to direction, y - along direction Default value: 2.6,18.2. Value range: 0, 50

Link copied to clipboard

Set the DropletSize property transition options.

Link copied to clipboard
abstract fun intensity(intensity: Expression): Rain
abstract fun intensity(intensity: Double = 1.0): Rain

Rain particles movement factor. Controls the overall rain particles speed Default value: 1. Value range: 0, 1

Link copied to clipboard

Set the Intensity property transition options.

Link copied to clipboard
abstract fun opacity(    opacity: Expression = Expression.fromRaw("""["interpolate",["linear"],["measure-light","brightness"],0,0.88,1,0.7]""".trimIndent())): Rain
abstract fun opacity(opacity: Double): Rain

Rain particles opacity. Default value: "["interpolate","linear","measure-light","brightness",0,0.88,1,0.7]". Value range: 0, 1

Link copied to clipboard

Set the Opacity property transition options.

Link copied to clipboard
abstract fun vignette(vignette: Expression = Expression.fromRaw("""["interpolate",["linear"],["zoom"],11,0,13,1]""".trimIndent())): Rain
abstract fun vignette(vignette: Double): Rain

Screen-space vignette rain tinting effect intensity. Default value: "["interpolate","linear","zoom",11,0,13,1]". Value range: 0, 1

Link copied to clipboard
abstract fun vignetteColor(vignetteColor: Expression = Expression.fromRaw("""["interpolate",["linear"],["measure-light","brightness"],0,"#001736",0.3,"#464646"]""".trimIndent())): Rain
abstract fun vignetteColor(@ColorInt vignetteColor: Int): Rain
abstract fun vignetteColor(vignetteColor: String): Rain

Rain vignette screen-space corners tint color. Default value: "["interpolate","linear","measure-light","brightness",0,"#001736",0.3,"#464646"]".

Link copied to clipboard

Set the VignetteColor property transition options.

Link copied to clipboard

Set the Vignette property transition options.

Inheritors

Link copied to clipboard