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

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

convert

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

reverseConvert

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

advance

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