The '''Scaler''' component scales a target scale based on the distance of the slot this component is on from ""Point"" = (<code>ScaleOffset</code> in <code>ScaleSource</code>'s transform space) with the distance of both points calculated in <code>ScaleSpace</code>.
If the slots are all under root, the <code>scaleTarget</code> is targeting the scale of this slot, <code>ScaleSource</code> is set to root, <code>ScaleMode</code> is set to 'FullIndependent', <code>ScaleOffest</code> is set to (0,0,0), <code>ScaleMultiplier</code> is set to (1,1,1), and the slot this component is on is an unmodified default cube, the edge of at least one part of the cube on this slot will match perfectly to Root.
<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ScaleOffset|Float3|
|ScaleOffset|Float3| The offset of point '''A''' to <code>ScaleSource</code>.
|ScaleMultiplier|Float3|
|ScaleMultiplier|Float3| How much to multiply the strength of the distance from '''A''' to '''B''' after conversion has on scale.
|ScaleSource|Slot|
|ScaleSource|Slot| The source space of point '''A'''.
|ScaleMode|'''[[#Mode|Mode]]'''|TypeAdv3=true|
|ScaleMode|'''[[#Mode|Mode]]'''|TypeAdv3=true| How to restrict the distance calculations for scaling certain axies.
|scaleTarget|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv5=True| The field to drive to the distance from '''A''' to '''B''' after conversion to space <code>ScaleSpace</code> and applying <code>ScaleMode</code> restrictions, and then muliplying by 2 * <code>ScaleMultiplier</code>.
}}
== Mode ==
{{Table EnumValues
|FullUniform|0| The distance calculation from point '''A''' to '''B''' should be equal on all axies.
|XYUniform|1| The distance calculation from point '''A''' to '''B''' should be done between the XY plane and applied to X and Y axis equally before calculating Z distance separately.
|YZUniform|2| The distance calculation from point '''A''' to '''B''' should be done between the YZ plane and applied to Y and Z axis equally before calculating X distance separately.
|XZUniform|3| The distance calculation from point '''A''' to '''B''' should be done between the XZ plane and applied to X and Z axis equally before calculating Y distance separately.
|FullIndependent|4| The distance calculation from point '''A''' to '''B''' should be done separately for each axis.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and fill the fields to start using this component.
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}
<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Scaler]]
[[Category:Components{{#translation:}}|Scaler]]
[[Category:Components With Nested Enums{{#translation:}}|Scaler]]
[[Category:Components With Nested Enums{{#translation:}}|Scaler]]
The Scaler component scales a target scale based on the distance of the slot this component is on from ""Point"" = (ScaleOffset in ScaleSource's transform space) with the distance of both points calculated in ScaleSpace.
If the slots are all under root, the scaleTarget is targeting the scale of this slot, ScaleSource is set to root, ScaleMode is set to 'FullIndependent', ScaleOffest is set to (0,0,0), ScaleMultiplier is set to (1,1,1), and the slot this component is on is an unmodified default cube, the edge of at least one part of the cube on this slot will match perfectly to Root.
The field to drive to the distance from A to B after conversion to space ScaleSpace and applying ScaleMode restrictions, and then muliplying by 2 * ScaleMultiplier.
Mode
Values
Name
Value
Description
FullUniform
0
The distance calculation from point A to B should be equal on all axies.
XYUniform
1
The distance calculation from point A to B should be done between the XY plane and applied to X and Y axis equally before calculating Z distance separately.
YZUniform
2
The distance calculation from point A to B should be done between the YZ plane and applied to Y and Z axis equally before calculating X distance separately.
XZUniform
3
The distance calculation from point A to B should be done between the XZ plane and applied to X and Z axis equally before calculating Y distance separately.
FullIndependent
4
The distance calculation from point A to B should be done separately for each axis.
Usage
Attach to a slot and fill the fields to start using this component.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.