add info to page. no longer component stub |
add more info, fix table |
||
Line 6: | Line 6: | ||
|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 | 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--> | ||
Line 14: | Line 15: | ||
|FrameAnimSpeed|Float|how fast the frame should fit to the asset's bounding box in seconds | |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. | |SnapAnimTime|Float| How long the animation should be for the asset going into the frame when snapped in seconds. | ||
|Targets|SyncList`1|TypeString3= | |Targets|SyncList`1|TypeString3=Asset Ref Fields| The items to drive with the snapped object's asset. | ||
|Callback|WorldDelegate| 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. | |Callback|WorldDelegate| 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. | |_current|Slot| The slot of the asset item inside of the frame. |
Revision as of 23:21, 13 February 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
|
Asset Ref Fields | The items to drive with the snapped object's asset. |
Callback
|
WorldDelegate | 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
|
IField<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.