DampingNode



A ValueNode that damps changes in an input value, causing the output value to slowly follow changes in the input value over a specified time or distance.

Summary

Public constructors

DampingNode(dampOver: ProgressDomain, strength: Float, input: ValueNode)

Creates a DampingNode that damps changes in an input value, causing the output value to slowly follow changes in the input value over a specified time or distance.

Cmn

Public functions

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

Public properties

ProgressDomain

The domain units over which damping is applied.

Cmn
ValueNode

The input node that produces the value to be modified by the damping.

Cmn
Float

The amount of damping to apply.

Cmn

Inherited functions

From androidx.ink.brush.behavior.Node
Version

Returns the minimum required Version for this Node.

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

DampingNode

DampingNode(dampOver: ProgressDomain, strength: Float, input: ValueNode)

Creates a DampingNode that damps changes in an input value, causing the output value to slowly follow changes in the input value over a specified time or distance.

If dampOver 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 regardless of the input.

Parameters
dampOver: ProgressDomain

The domain units over which damping is applied.

strength: Float

A scaling factor, in dampOver units, for the damping. A smaller strength value results in less damping, so the output follows the input more closely.

input: ValueNode

input node that produces the value to be modified by the damping

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

dampOver

val dampOverProgressDomain

The domain units over which damping is applied.

input

val inputValueNode

The input node that produces the value to be modified by the damping.

strength

val strengthFloat

The amount of damping to apply.