This commit is contained in:
ntr
2019-03-28 15:23:03 +11:00
parent 2494b2dd5f
commit 4e1b1dd2cb
38 changed files with 4551 additions and 1 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ const genAvatar = (name) => {
for (let i = 0; i < name.length; i += 1) {
const chr = name.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash = hash & 19; // We have avatars named 0-19
hash = hash & 10000; // We have avatars named 0-19
}
return `sprite${hash}`;
};