Component:LinearMapper1D: Difference between revisions

From Resonite Wiki
imported>Xekri
No edit summary
 
add info
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:
|Name=Linear Mapper 1D
|Name=Linear Mapper 1D
}}
}}
Linear Mapper 1D is a component that live maps one range to another, allowing for a reverse mapping of the target range value back to the source range when it is written to.


<!--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<float>|
|Target|{{RootFieldType|FieldDrive`1|[[Type:Float|Float]]}}|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|Float|
|TargetMin|Float| The minimum of the range of the <code>Target</code> value.
|TargetMax|Float|
|TargetMax|Float| 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.
|Clamp|Bool|
|Clamp|Bool| Whether to prevent <code>Source</code> and <code>Target</code> from going outside their defined ranges.
}}
}}


Line 30: Line 31:
<!--T:5-->
<!--T:5-->
== Related Components ==
== Related Components ==
* [[Component:LinearMapper1D|LinearMapper1D]]
* [[Component:LinearMapper2D|LinearMapper2D]]
* [[Component:LinearMapper3D|LinearMapper3D]]
* [[Component:LinearMapper4D|LinearMapper4D]]
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Linear Mapper 1D]]
[[Category:Components{{#translation:}}|Linear Mapper 1D]]
[[Category:Components:Transform:Drivers{{#translation:}}|Linear Mapper 1D]]
[[Category:Components:Transform:Drivers{{#translation:}}|Linear Mapper 1D]]

Latest revision as of 19:43, 27 October 2024


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


Component image 
Linear Mapper 1D component as seen in the Scene Inspector

Linear Mapper 1D is a component that live maps one range to another, allowing for a reverse mapping of the target range value back to the source range when it is written to.

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.
Source direct RelayRef`1<IValue`1<Float>> The value to map from SourceMin to SourceMax using Target.
Target field drive of Float 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 Float The minimum of the range of the Target value.
TargetMax Float 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.
Clamp Bool Whether to prevent Source and Target from going outside their defined ranges.

Usage

Examples

Related Components