SvgFacet
getAavegotchiSvg
Given an aavegotchi token id, return the combined SVG of its layers and its wearables
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | the identifier of the token to query |
Return Values
Name | Type | Description |
---|---|---|
ag_ | string | The final svg which contains the combined SVG of its layers and its wearables |
SvgLayerDetails
AavegotchiLayers
previewAavegotchi
Allow the preview of an aavegotchi given the haunt id,a set of traits,wearables and collateral type
Parameters
Name | Type | Description |
---|---|---|
_hauntId | uint256 | Haunt id to use in preview / |
_collateralType | address | The type of collateral to use |
_numericTraits | int16[6] | The numeric traits to use for the aavegotchi |
equippedWearables | uint16[16] | The set of wearables to wear for the aavegotchi |
Return Values
Name | Type | Description |
---|---|---|
ag_ | string | The final svg string being generated based on the given test parameters |
portalAavegotchisSvg
Query the svg data for all aavegotchis with the portals as bg (10 in total)
This is only valid for opened and unclaimed portals
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | the identifier of the NFT(opened portal) |
Return Values
Name | Type | Description |
---|---|---|
svg_ | string[10] | An array containing the svg strings for eeach of the aavegotchis inside the portal //10 in total |
getSvg
Query the svg data for a particular item
Will throw if that item does not exist
Parameters
Name | Type | Description |
---|---|---|
_svgType | bytes32 | the type of svg |
_itemId | uint256 | The identifier of the item to query |
Return Values
Name | Type | Description |
---|---|---|
svg_ | string | The svg string for the item |
getSvgs
Query the svg data for a multiple items of the same type
Will throw if one of the items does not exist
Parameters
Name | Type | Description |
---|---|---|
_svgType | bytes32 | The type of svg |
_itemIds | uint256[] | The identifiers of the items to query |
Return Values
Name | Type | Description |
---|---|---|
svgs_ | string[] | An array containing the svg strings for each item queried |
getItemSvg
Query the svg data for a particular item (with dimensions)
Will throw if that item does not exist
Parameters
Name | Type | Description |
---|---|---|
_itemId | uint256 | The identifier of the item to query |
Return Values
Name | Type | Description |
---|---|---|
ag_ | string | The svg string for the item |
storeSvg
Allow an item manager to store a new svg
Parameters
Name | Type | Description |
---|---|---|
_svg | string | the new svg string |
_typesAndSizes | struct LibSvg.SvgTypeAndSizes[] | An array of structs, each struct containing the types and sizes data for |
updateSvg
Allow an item manager to update an existing svg
Parameters
Name | Type | Description |
---|---|---|
_svg | string | the new svg string |
_typesAndIdsAndSizes | struct LibSvg.SvgTypeAndIdsAndSizes[] | An array of structs, each struct containing the types,identifier and sizes data for |
deleteLastSvgLayers
Allow an item manager to delete the svg layers of an svg
Parameters
Name | Type | Description |
---|---|---|
_svgType | bytes32 | The type of svg |
_numLayers | uint256 | The number of layers to delete (from the last one) |
Sleeve
setSleeves
Allow an item manager to set the sleeves of multiple items at once
each sleeve in _sleeves
already contains the _itemId
to apply to
Parameters
Name | Type | Description |
---|---|---|
_sleeves | struct SvgFacet.Sleeve[] | An array of structs,each struct containing details about the new sleeves of each item ` |
setItemsDimensions
Allow an item manager to set the dimensions of multiple items at once
Parameters
Name | Type | Description |
---|---|---|
_itemIds | uint256[] | The identifiers of the items whose dimensions are to be set |
_dimensions | struct Dimensions[] | An array of structs,each struct containing details about the new dimensions of each item in |
getNextSleeveId
used for setting starting id for new sleeve set uploads
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | next available sleeve id to start new set upload |