NoiseNode



A ValueNode that produces a smooth random function.

Summary

Public constructors

NoiseNode(seed: Int, varyOver: ProgressDomain, basePeriod: Float)

Creates a NoiseNode that produces a random variation.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Float

The base period of the random function.

Cmn
Int

The seed for the random number generator.

Cmn
ProgressDomain

The source of the varying over which the random function is evaluated.

Cmn

Inherited properties

From androidx.ink.brush.behavior.Node
List<ValueNode>

The ordered list of inputs that this node directly depends on.

Cmn

Public constructors

NoiseNode

NoiseNode(seed: Int, varyOver: ProgressDomain, basePeriod: Float)

Creates a NoiseNode that produces a random variation.

A new random value between 0 and 1 will be generated every basePeriod units along the varyOver domain, with the output of this node shifting smoothly between successive random values.

If varyOver is ProgressDomain.DISTANCE_IN_CENTIMETERS and the stroke input data does not indicate the relationship between stroke units and physical units (e.g. as may be the case for programmatically-generated inputs), then the output value will be null.

Parameters
seed: Int

the seed for the random number generator

varyOver: ProgressDomain

the source of the varying over which the random function is evaluated

basePeriod: Float

the base period of the random function

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

basePeriod

val basePeriodFloat

The base period of the random function.

seed

val seedInt

The seed for the random number generator.

varyOver

val varyOverProgressDomain

The source of the varying over which the random function is evaluated.