Links

SvgViewsFacet

getAavegotchiSideSvgs

function getAavegotchiSideSvgs(uint256 _tokenId) public view returns (string[] ag_)
Get the sideview svgs of an aavegotchi
Only valid for claimed aavegotchis

Parameters

Name
Type
Description
_tokenId
uint256
The identifier of the aavegotchi to query

Return Values

Name
Type
Description
ag_
string[]
An array of svgs, each one representing a certain perspective i.e front,left,right,back views respectively

SvgLayerDetails

struct SvgLayerDetails {
string primaryColor;
string secondaryColor;
string cheekColor;
bytes collateral;
int256 trait;
int256[18] eyeShapeTraitRange;
bytes eyeShape;
string eyeColor;
int256[8] eyeColorTraitRanges;
string[7] eyeColors;
}

AavegotchiLayers

struct AavegotchiLayers {
bytes background;
bytes bodyWearable;
bytes hands;
bytes face;
bytes eyes;
bytes head;
bytes sleeves;
bytes handLeft;
bytes handRight;
bytes pet;
}

previewSideAavegotchi

function previewSideAavegotchi(uint256 _hauntId, address _collateralType, int16[6] _numericTraits, uint16[16] equippedWearables) external view returns (string[] ag_)
Allow the sideview 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 sideview svg strings being generated based on the given test parameters

getItemSvgs

function getItemSvgs(uint256 _itemId) public view returns (string[] svg_)
Query the sideview svg of an item

Parameters

Name
Type
Description
_itemId
uint256
Identifier of the item to query

Return Values

Name
Type
Description
svg_
string[]
The sideview svg of the item`

getItemsSvgs

function getItemsSvgs(uint256[] _itemIds) public view returns (string[][] svgs_)
Query the svg of multiple items

Parameters

Name
Type
Description
_itemIds
uint256[]
Identifiers of the items to query

Return Values

Name
Type
Description
svgs_
string[][]
The svgs of each item in _itemIds

SideViewDimensionsArgs

struct SideViewDimensionsArgs {
uint256 itemId;
string side;
struct Dimensions dimensions;
}

setSideViewDimensions

function setSideViewDimensions(struct SvgViewsFacet.SideViewDimensionsArgs[] _sideViewDimensions) external
Allow an item manager to set the sideview dimensions of an existing item

Parameters

Name
Type
Description
_sideViewDimensions
struct SvgViewsFacet.SideViewDimensionsArgs[]
An array of structs, each struct onating details about the sideview dimensions like itemId,side amd dimensions

SideViewExceptions

struct SideViewExceptions {
uint256 itemId;
uint256 slotPosition;
bytes32 side;
bool exceptionBool;
}

setSideViewExceptions

function setSideViewExceptions(struct SvgViewsFacet.SideViewExceptions[] _sideViewExceptions) external