Skip to content

Commit

Permalink
fix: face reversal, mote reversal (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-a-v-i-n authored Jul 31, 2022
1 parent 11b28d9 commit ac06faf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/libraries/Face.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ library Face {

function render(bytes32 _seed) internal pure returns (string memory) {
uint256 faceSeed = uint256(keccak256(abi.encodePacked(_seed, "face")));

bool reverse = faceSeed == 0;
bool reverse = faceSeed % 2 == 0;
faceSeed /= 2;
string memory rotation = ["1", "2", "4", "6", "-1", "-2", "-4", "-6"][faceSeed % 8];

Expand Down
6 changes: 5 additions & 1 deletion src/libraries/Motes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ library Motes {
SVG.element(
"circle",
SVG.circleAttributes(_radius, _coords, "white", _opacity, "lighten", ""),
SVG.element("animateMotion", SVG.animateMotionAttributes(_reverse, _dur, "paced"), Data.mpathJitterSm())
SVG.element(
"animateMotion",
SVG.animateMotionAttributes(_reverse, _dur, "linear"),
Data.mpathJitterSm()
)
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Traits.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library Traits {
result = string.concat(result, _attribute("Density", densityTrait(_seed)));
result = string.concat(result, ",", _attribute("Polarity", polarityTrait(_seed)));
result = string.concat(result, ",", _attribute("Glints", glintTrait(_seed)));
result = string.concat(result, ",", _attribute("Mote", moteTrait(_seed)));
result = string.concat(result, ",", _attribute("Motes", moteTrait(_seed)));
result = string.concat(result, ",", _attribute("Eyes", eyeTrait(_seed)));
result = string.concat(result, ",", _attribute("Mouth", mouthTrait(_seed)));
result = string.concat(result, ",", _attribute("Cheeks", cheekTrait(_seed)));
Expand Down

0 comments on commit ac06faf

Please sign in to comment.