NoiseNode
| kotlin.Any | |||
| ↳ | androidx.ink.brush.behavior.Node | ||
| ↳ | androidx.ink.brush.behavior.ValueNode | ||
| ↳ | androidx.ink.brush.behavior.NoiseNode |
A ValueNode that produces a smooth random function.
Summary
Public constructors |
|
|---|---|
NoiseNode(seed: Int, varyOver: ProgressDomain, basePeriod: Float)Creates a |
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 functions |
|||
|---|---|---|---|
|
Inherited properties |
|---|
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 properties
varyOver
val varyOver: ProgressDomain
The source of the varying over which the random function is evaluated.