SnowDslReceiver

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): Snow
abstract fun centerThinning(centerThinning: Double = 0.4): Snow

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

Link copied to clipboard

Set the CenterThinning property transition options.

Link copied to clipboard
abstract fun color(color: Expression): Snow
abstract fun color(@ColorInt color: Int): Snow
abstract fun color(color: String = "#ffffff"): Snow

Snow particles color. Default value: "#ffffff".

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.85]""".trimIndent())): Snow
abstract fun density(density: Double): Snow

Snow particles density. Controls the overall particles number. Default value: "["interpolate","linear","zoom",11,0,13,0.85]". Value range: 0, 1

Link copied to clipboard

Set the Density property transition options.

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

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

Link copied to clipboard

Set the Direction property transition options.

Link copied to clipboard
abstract fun flakeSize(flakeSize: Expression): Snow
abstract fun flakeSize(flakeSize: Double = 0.71): Snow

Snow flake particle size. Correlates with individual particle screen size Default value: 0.71. Value range: 0, 5

Link copied to clipboard

Set the FlakeSize property transition options.

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

Snow particles movement factor. Controls the overall particles movement 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): Snow
abstract fun opacity(opacity: Double = 1.0): Snow

Snow particles opacity. Default value: 1. 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,0.3]""".trimIndent())): Snow
abstract fun vignette(vignette: Double): Snow

Snow vignette screen-space effect. Adds snow tint to screen corners Default value: "["interpolate","linear","zoom",11,0,13,0.3]". Value range: 0, 1

Link copied to clipboard
abstract fun vignetteColor(vignetteColor: Expression): Snow
abstract fun vignetteColor(@ColorInt vignetteColor: Int): Snow
abstract fun vignetteColor(vignetteColor: String = "#ffffff"): Snow

Snow vignette screen-space corners tint color. Default value: "#ffffff".

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