The '''ObjectScroller''' component acts as a way to scroll a list of items with sizes by offsetting them within a region they should appear within. Objects outside of the region get disabled until the <code>Offset</code> allows them to appear within it again.
|Items|{{RootFieldType|SyncList`1|[[#Item|Item]]}}|TypeAdv0=true| A list of items to move and activate/deactivate if they are within/outside of the <code>RegionSize</code>
|Offset|Float3|
|Offset|Float3| How much to offset the positions of <code>Items</code> in order to scroll them.
|RegionSize|Float3|
|RegionSize|Float3| The size area objects have to be touching from their current position and size after <code>Offset</code> is applied in order to stay visible.
}}
== Item ==
{{Table TypeFields
|Position|Float3| Original position of the item before <code>Offset</code>.
|Size|Float3| The size of this item.
|PositionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv2=true| Drives the item's position so <code>Offset</code> can affect it.
|ScaleDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv3=true| Used to scale the item down if the item cannot fit within <code>RegionSize</code> at its current position.
|ActiveDrive|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Used to enable/disable the item if it's inside/outside of <code>RegionSize</code>.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and add/setup <code>Items</code> entries to begin use.
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Can be used to make a conveyor belt of items or a sliding wardrobe of avatars.
The ObjectScroller component acts as a way to scroll a list of items with sizes by offsetting them within a region they should appear within. Objects outside of the region get disabled until the Offset allows them to appear within it again.