Class: ModelProperty<TInstanceValue, T>
Defined in: ui/properties/model-property.ts:19
Represents a model property that can be used in a view model. This class encapsulates a Rive property instance value and provides an event that is raised whenever the property value changes.
Type Parameters
TInstanceValue
TInstanceValue
extends RivePropertyInstanceValue
<T
>
The type of the Rive property instance value.
T
T
The type of the value held by the property.
Constructors
Constructor
new ModelProperty<
TInstanceValue
,T
>(property
):ModelProperty
<TInstanceValue
,T
>
Defined in: ui/properties/model-property.ts:37
Creates a new instance of the ModelProperty class. It initializes the property and sets up the change event listener.
Parameters
property
TInstanceValue
The Rive property instance value to encapsulate.
Returns
ModelProperty
<TInstanceValue
, T
>
Properties
onChangeEvent
readonly
onChangeEvent:ParameterizedForgeEvent
<T
>
Defined in: ui/properties/model-property.ts:27
Event that is raised when the property value changes. The event provides the new value of the property.
Accessors
value
Get Signature
get value():
T
Defined in: ui/properties/model-property.ts:52
Gets the value of the property.
Returns
T
Set Signature
set value(
value
):void
Defined in: ui/properties/model-property.ts:61
Sets the value of the property.
Parameters
value
T
The new value to set for the property.
Returns
void