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(
    dampingSource: ProgressDomain,
    dampingGap: 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

Float

The amount of damping to apply.

Cmn
ProgressDomain

The source of the damping.

Cmn
ValueNode

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

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(
    dampingSource: ProgressDomain,
    dampingGap: 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 dampingSource 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
dampingSource: ProgressDomain

the source of the damping

dampingGap: Float

the amount of damping to apply

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

dampingGap

val dampingGapFloat

The amount of damping to apply.

dampingSource

val dampingSourceProgressDomain

The source of the damping.

input

val inputValueNode

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