Adding notes about an issue I had and a workaround. Could move this to another article... |
add missing sections, re add stubed |
||
Line 18: | Line 18: | ||
|ExcludeList|{{RootFieldType|SyncRefList`1|[[Type:IBounded|IBounded]]}}|TypeAdv9=true| A list of slots which are excluded from the aligner | |ExcludeList|{{RootFieldType|SyncRefList`1|[[Type:IBounded|IBounded]]}}|TypeAdv9=true| A list of slots which are excluded from the aligner | ||
|_targets|{{RootFieldType|SyncList`1|[[#Target|Target]]}}|TypeAdv10=true| A list of slots which will be aligned. This will be automatically generated if <code>AutoAddChildren</code> is enabled. | |_targets|{{RootFieldType|SyncList`1|[[#Target|Target]]}}|TypeAdv10=true| A list of slots which will be aligned. This will be automatically generated if <code>AutoAddChildren</code> is enabled. | ||
}} | |||
== Target == | |||
{{stub}} | |||
{{Table TypeFields | |||
}} | |||
== Align == | |||
{{stub}} | |||
{{Table EnumValues | |||
}} | |||
== AxisDir == | |||
{{stub}} | |||
{{Table EnumValues | |||
}} | }} | ||
Line 23: | Line 38: | ||
As the Axis Aligner works off of Bounds Calculations, and runs its calculations under a wide range of criteria, it can quickly become heavy with a doezen slots or so. Its Bounds-based nature alao makes it unsuited for evenly spacing objects with different bounds. | As the Axis Aligner works off of Bounds Calculations, and runs its calculations under a wide range of criteria, it can quickly become heavy with a doezen slots or so. Its Bounds-based nature alao makes it unsuited for evenly spacing objects with different bounds. | ||
To mitigate these kinds of issues, one can make their own version of this in Protoflux, by having OnChange or other triggers fire a ForLoop, which iterates through all Slot Children, and gives them an offset based on the Iteration multiplied by a Float3 for the position. To further implement the | To mitigate these kinds of issues, one can make their own version of this in Protoflux, by having OnChange or other triggers fire a ForLoop, which iterates through all Slot Children, and gives them an offset based on the Iteration multiplied by a Float3 for the position. To further implement the bounds functionality, one can use a value that increases by the bounds calculation every iteration, instead of a number based on the Iteration itself. | ||
A simple example was used to align the Avatars in [[Avatar Station]], and is available in Nuki's Public Folder. | A simple example was used to align the Avatars in [[Avatar Station]], and is available in Nuki's Public Folder. | ||
Line 33: | Line 48: | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:ComponentStubs]] | |||
[[Category:Components{{#translation:}}|Axis Aligner]] | [[Category:Components{{#translation:}}|Axis Aligner]] | ||
[[Category:Components With Nested Enums{{#translation:}}|Axis Aligner]] | [[Category:Components With Nested Enums{{#translation:}}|Axis Aligner]] | ||
[[Category:Components With Nested Types{{#translation:}}|Axis Aligner]] | [[Category:Components With Nested Types{{#translation:}}|Axis Aligner]] | ||
[[Category:Components:Transform:Drivers{{#translation:}}|Axis Aligner]] | [[Category:Components:Transform:Drivers{{#translation:}}|Axis Aligner]] |
Revision as of 17:58, 4 December 2024
Usage
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. |
AutoAddChildren
|
Bool | Controls whether slots below this component's slot in the hierarchy are automatically added to _targets
|
Direction
|
AxisDir | The axis and direction the items will be aligned on |
GlobalAxisXAlign
|
Align | Controls how items will be aligned globally, with each other in the X Axis |
GlobalAxisYAlign
|
Align | Controls how items will be aligned globally, with each other in the Y Axis |
GlobalAxisZAlign
|
Align | Controls how items will be aligned globally, with each other in the Z Axis |
ElementAxisXAlign
|
Align | Controls how each item aligns itself, within the align, in the X Axis |
ElementAxisYAlign
|
Align | Controls how each item aligns itself, within the align, in the Y Axis |
ElementAxisZAlign
|
Align | Controls how each item aligns itself, within the align, in the Z Axis |
Separation
|
Float | The spacing between each item in _targets along the specified axis
|
ExcludeList
|
list of IBounded | A list of slots which are excluded from the aligner |
_targets
|
list of Target | A list of slots which will be aligned. This will be automatically generated if AutoAddChildren is enabled.
|
Target
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Name | Type | Description |
---|
Align
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Name | Value | Description |
---|
AxisDir
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Name | Value | Description |
---|
Disadvantages and Alternatives
As the Axis Aligner works off of Bounds Calculations, and runs its calculations under a wide range of criteria, it can quickly become heavy with a doezen slots or so. Its Bounds-based nature alao makes it unsuited for evenly spacing objects with different bounds.
To mitigate these kinds of issues, one can make their own version of this in Protoflux, by having OnChange or other triggers fire a ForLoop, which iterates through all Slot Children, and gives them an offset based on the Iteration multiplied by a Float3 for the position. To further implement the bounds functionality, one can use a value that increases by the bounds calculation every iteration, instead of a number based on the Iteration itself.
A simple example was used to align the Avatars in Avatar Station, and is available in Nuki's Public Folder.