The '''LinearColorMapper''' allows for mapping a float to a color range, and optionally do so in reverse.
<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Source|IValue`1|TypeString0=IValue<float>|
|Source|{{RootFieldType|RelayRef`1|[[Type:IValue`1|IValue`1]]<[[Type:Float|Float]]>}}|TypeAdv0=true| The value to map from <code>SourceMin</code> to <code>SourceMax</code> using <code>Target</code>.
|Target|IField`1|TypeString1=IField<color>|
|Target|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv1=true| The value to map from <code>TargetMin</code> to <code>TargetMax</code> using <code>Source</code>.
|SourceMin|Float|
|SourceMin|Float| The minimum of the range of the <code>Source</code> value.
|SourceMax|Float|
|SourceMax|Float| The maximum of the range of the <code>Source</code> value.
|TargetMin|Color|
|TargetMin|ColorX| The minimum of the range of the <code>Target</code> value.
|TargetMax|Color|
|TargetMax|ColorX| The maximum of the range of the <code>Target</code> value.
|AllowReverseMapping|Bool|
|AllowReverseMapping|Bool| Allow <code>Target</code> to map it's value to <code>Source</code>'s ranged value when written to. See [[Drives#Write Backs|write backs]].
|Clamp|Bool|
|Clamp|Bool| Whether to prevent <code>Source</code> and <code>Target</code> from going outside their defined ranges.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
{{stub}}
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}
<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Linear Color Mapper]]
[[Category:Components{{#translation:}}|Linear Color Mapper]]
[[Category:Components:Transform:Drivers{{#translation:}}|Linear Color Mapper]]
[[Category:Components:Transform:Drivers{{#translation:}}|Linear Color Mapper]]
Latest revision as of 18:24, 17 February 2025
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
Linear Color Mapper component as seen in the Scene Inspector
The LinearColorMapper allows for mapping a float to a color range, and optionally do so in reverse.