Skip to main content
A scripted converter used for transforming values between ViewModel data bindings and Rive properties. Type parameters: T: The converter type I: The input type, must be a DataValue type (DataValueNumber, DataValueString, DataValueBoolean, DataValueColor, etc) O: The output type, must be a DataValue type (DataValueNumber, DataValueString, DataValueBoolean, DataValueColor, etc) See Converter Scripts.

Methods

init

Called once when the converter is created. Returns true if initialization succeeds.

convert

Converts the input value (a view model property) to an output value. The input parameter must be a DataValue type.

reverseConvert

Converts the output value back to an input value (a view model property). The input parameter must be a DataValue type.

advance

Optional per-frame update. Returns true if the converter should continue receiving advance calls.