-
-
Save kamescg/ea79423420ffb3daa9218b88095cd69c to your computer and use it in GitHub Desktop.
PixelPooly Render
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _render(bytes memory input) internal view returns (string memory) { | |
(uint8 head, uint8 body, uint8 headAcc, uint8 bodyAcc, uint8 bg) = abi.decode( | |
input, | |
(uint8, uint8, uint8, uint8, uint8) | |
); | |
return | |
string( | |
abi.encodePacked( | |
svg.start(), | |
_registry(PIXEL_POOLY_V0, abi.encode(4, bg)), | |
_registry(PIXEL_POOLY_V0, abi.encode(0, head)), | |
_registry(PIXEL_POOLY_V0, abi.encode(1, body)), | |
_registry(PIXEL_POOLY_V0, abi.encode(2, headAcc)), | |
_registry(PIXEL_POOLY_V0, abi.encode(3, bodyAcc)), | |
svg.end() | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment