Component:LinearColorMapper: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page LinearColorMapper (Component) to Component:LinearColorMapper: Creating component Namespace
add link
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:
|Name=Linear Color Mapper
|Name=Linear Color Mapper
}}
}}
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]]&lt;[[Type:Float|Float]]&gt;}}|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.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
Source direct RelayRef`1<IValue`1<Float>> The value to map from SourceMin to SourceMax using Target.
Target field drive of ColorX The value to map from TargetMin to TargetMax using Source.
SourceMin Float The minimum of the range of the Source value.
SourceMax Float The maximum of the range of the Source value.
TargetMin ColorX The minimum of the range of the Target value.
TargetMax ColorX The maximum of the range of the Target value.
AllowReverseMapping Bool Allow Target to map it's value to Source's ranged value when written to. See write backs.
Clamp Bool Whether to prevent Source and Target from going outside their defined ranges.

Usage

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


See Also