imported>Xekri Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=AssetFrameSlot`1Component.png |Name=Asset Frame Slot`1 }} <!--T:2--> == Fields == {{Table C..." |
Automated: update Fields, Categories |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=AssetFrameSlot`1Component.png | |Image=AssetFrameSlot`1Component.png | ||
|Name=Asset Frame Slot`1 | |Name=Asset Frame Slot`1 | ||
}} | }} | ||
An asset frame slot is a component that takes any [[Type:IAsset`1|Asset Type]] as an attach component type argument, and allows for snapping assets to a frame. The asset in the frame can be used as a source to drive a list of asset fields which is defined in Targets. | |||
Optionally it calls a sync delegate that takes an argument of the chosen asset type for this component. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|FrameSize|Float| | |FrameSize|Float|how thick the frame should be. | ||
|FrameAnimSpeed|Float| | |FrameAnimSpeed|Float|how fast the frame should fit to the asset's bounding box in seconds | ||
|SnapAnimTime|Float| | |SnapAnimTime|Float| How long the animation should be for the asset going into the frame when snapped in seconds. | ||
|Targets|SyncList`1| | |Targets|{{RootFieldType|SyncList`1|[[Type:SyncRef`1|SyncRef`1]]<[[Type:SyncRef`1|SyncRef`1]]<[[Type:IAssetProvider`1|IAssetProvider`1]]<A>>>}}|TypeAdv3=true| The items to drive with the snapped object's asset. | ||
|Callback| | |Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<[[Type:IAssetProvider`1|IAssetProvider`1]]<A>>}}|TypeAdv4=true| A sync delegate that takes an argument of the chosen asset type for this component. The sync delegate is called when the asset is snapped. | ||
|_current|Slot| | |_current|Slot| The slot of the asset item inside of the frame. | ||
|_currentRatio|Float2| | |_currentRatio|Float2| The ratio of the asset's bounding box held in the frame | ||
|_frameSize| | |_frameSize|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv7=true| The field to drive with what the size of the frame should be for the held asset's bounding box. | ||
|_collider|BoxCollider| | |_collider|'''[[Component:BoxCollider|BoxCollider]]'''|TypeAdv8=true| The collider to drive the values of the size of the held asset's bounding box. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
{{Stub}} | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
{{Stub}} | |||
<!--T:5--> | <!--T:5--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Asset Frame Slot`1]] | [[Category:Components{{#translation:}}|Asset Frame Slot`1]] | ||
[[Category:Generic Components{{#translation:}}|Asset Frame Slot`1]] | |||
[[Category:Components:Transform:Interaction{{#translation:}}|Asset Frame Slot`1]] | [[Category:Components:Transform:Interaction{{#translation:}}|Asset Frame Slot`1]] |
Latest revision as of 21:33, 3 March 2024
Component image
An asset frame slot is a component that takes any Asset Type as an attach component type argument, and allows for snapping assets to a frame. The asset in the frame can be used as a source to drive a list of asset fields which is defined in Targets. Optionally it calls a sync delegate that takes an argument of the chosen asset type for this component.
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. |
FrameSize
|
Float | how thick the frame should be. |
FrameAnimSpeed
|
Float | how fast the frame should fit to the asset's bounding box in seconds |
SnapAnimTime
|
Float | How long the animation should be for the asset going into the frame when snapped in seconds. |
Targets
|
list of SyncRef`1<SyncRef`1<IAssetProvider`1<A>>> | The items to drive with the snapped object's asset. |
Callback
|
Action`1<IAssetProvider`1<A>> | A sync delegate that takes an argument of the chosen asset type for this component. The sync delegate is called when the asset is snapped. |
_current
|
Slot | The slot of the asset item inside of the frame. |
_currentRatio
|
Float2 | The ratio of the asset's bounding box held in the frame |
_frameSize
|
field drive of Float2 | The field to drive with what the size of the frame should be for the held asset's bounding box. |
_collider
|
BoxCollider | The collider to drive the values of the size of the held asset's bounding box. |
Usage
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.