ParticleStyle

class ParticleStyle(var expression: SampleExpression = SampleExpression.NUMBER, var channels: List<ColorBand> = listOf(ColorBand.red), var quality: DataQuality = DataQuality.normal, var interpolation: InterpolationMode = InterpolationMode.BICUBIC, var smoothing: Float = 0.0f, var offset: Float = 0.0f, var drawRange: ClosedRange<Double>? = null, var colorScale: ColorScaleOptions = ColorScaleOptions(), var opacity: Float = 1.0f, var density: ParticleDensity = ParticleDensity.NORMAL, var size: Float = 2.0f, var speed: Float = 1.0f, var trails: Boolean = true, var trailsFade: Float = ParticleTrailLength.NORMAL.value, var dropRate: Float = 1.0f, var dropRateBump: Float = 1.0f, val vectorOffset: Float = 0.5f) : RasterStyle, ColorSampling

Particle style.

Constructors

Link copied to clipboard
constructor(expression: SampleExpression = SampleExpression.NUMBER, channels: List<ColorBand> = listOf(ColorBand.red), quality: DataQuality = DataQuality.normal, interpolation: InterpolationMode = InterpolationMode.BICUBIC, smoothing: Float = 0.0f, offset: Float = 0.0f, drawRange: ClosedRange<Double>? = null, colorScale: ColorScaleOptions = ColorScaleOptions(), opacity: Float = 1.0f, density: ParticleDensity = ParticleDensity.NORMAL, size: Float = 2.0f, speed: Float = 1.0f, trails: Boolean = true, trailsFade: Float = ParticleTrailLength.NORMAL.value, dropRate: Float = 1.0f, dropRateBump: Float = 1.0f, vectorOffset: Float = 0.5f)

Properties

Link copied to clipboard
open override var channel: SampleChannel
Link copied to clipboard
open override var channels: List<ColorBand>

Which of 3 rgb channels from the source image to use. Default is ColorBand.red

Link copied to clipboard
open override var colorScale: ColorScaleOptions

A ColorScale maps numeric values to a color palette. The scale can then be used to generate a set of colors for a given range of values and options.

Link copied to clipboard

The density of the particles. default is ParticleDensity.NORMAL.

Link copied to clipboard
open override var drawRange: ClosedRange<Double>?

Limits the data range that should be rendered from the sampled data. If not provided, then the full data range provided by the associated data source will be rendered by default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var expression: SampleExpression

Determines how data should be sampled from the encoded data texture.

Link copied to clipboard
open override var interpolation: InterpolationMode

The type of blending done on the source texture. The default is InterpolationMode.BICUBIC.

Link copied to clipboard
open override var offset: Float

Normalized amount to shift the interpolated sample values from 0 to 1. This is typically used for expression operations like diff where interpolated values can be negative and you need to start values half way (0.5) between the colorscale.range.

Link copied to clipboard
open override var opacity: Float

The opacity of the particles, from 0f to 1f. Default is 1f.

Link copied to clipboard
open override var quality: DataQuality

The resolution of the underlying texture. Default is DataQuality.normal

Link copied to clipboard
var size: Float

The size of the individual particles. Default is 2f

Link copied to clipboard
open override var smoothing: Float

The amount of smoothing used on the the source texture.

Link copied to clipboard

How fast the particles travel. Default is 1f.

Link copied to clipboard

The transparent tails can be endabled or disabled. Default is true.

Link copied to clipboard

The rate at which the transparent trails fade, from 0 to 1. This affects trail length. .9f fades quickly, 1f never fades. Default is .97f

Link copied to clipboard
val vectorOffset: Float = 0.5f