Automated: update Fields, Categories |
add info |
||
Line 7: | Line 7: | ||
|Name=Texture Size Driver | |Name=Texture Size Driver | ||
}} | }} | ||
The '''TextureSizeDriver''' component drives a field with the size of a texture in pixels. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv0=true| | |Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv0=true| The texture to get a size from. | ||
|Target|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv1=true| | |Target|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv1=true| The value field to drive with the final result value. | ||
|DriveMode|'''[[#Mode|Mode]]'''|TypeAdv2=true| | |DriveMode|'''[[#Mode|Mode]]'''|TypeAdv2=true| The way of restricting <code>Texture</code> size values as second step. | ||
|Premultiply|Float2| | |Premultiply|Float2| The value to multiply the <code>Texture</code> size by as first step. | ||
|Ratio|Float2| | |Ratio|Float2| The value to multiply the <code>Texture</code> size by as the third step. | ||
|MaxSize|Float2| | |MaxSize|Float2| The value to restrict the output value to be less than this as the final step. | ||
}} | |||
== Mode == | |||
{{Table EnumValues | |||
|Absolute|0| Use the <code>Texture</code> size without modifying the value. | |||
|UnitHeight|1| Take the <code>Texture</code> size and divide it by the height of the texture. | |||
|UnitWidth|2| Take the <code>Texture</code> size and divide it by the width of the texture. | |||
|Normalized|3| treat the <code>Texture</code> size as a vector and normalize it. | |||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Attach to a slot and provide a <code>Texture</code> and a <code>Target>/code> to get started. | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
{{stub}}. | |||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Texture Size Driver]] | [[Category:Components{{#translation:}}|Texture Size Driver]] | ||
[[Category:Components With Nested Enums{{#translation:}}|Texture Size Driver]] | [[Category:Components With Nested Enums{{#translation:}}|Texture Size Driver]] | ||
[[Category:Components:Transform:Drivers{{#translation:}}|Texture Size Driver]] | [[Category:Components:Transform:Drivers{{#translation:}}|Texture Size Driver]] |
Revision as of 22:44, 4 February 2025
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image 
Texture Size Driver component as seen in the Scene Inspector

The TextureSizeDriver component drives a field with the size of a texture in pixels.
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. |
Texture
|
ITexture2D | The texture to get a size from. |
Target
|
field drive of Float2 | The value field to drive with the final result value. |
DriveMode
|
Mode | The way of restricting Texture size values as second step.
|
Premultiply
|
Float2 | The value to multiply the Texture size by as first step.
|
Ratio
|
Float2 | The value to multiply the Texture size by as the third step.
|
MaxSize
|
Float2 | The value to restrict the output value to be less than this as the final step. |
Mode
Name | Value | Description |
---|---|---|
Absolute
|
0 | Use the Texture size without modifying the value.
|
UnitHeight
|
1 | Take the Texture size and divide it by the height of the texture.
|
UnitWidth
|
2 | Take the Texture size and divide it by the width of the texture.
|
Normalized
|
3 | treat the Texture size as a vector and normalize it.
|
Usage
Attach to a slot and provide a Texture
and a Target>/code> to get started.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
.
See Also