Revert "[RFC] Randomized names next to mouse pointers. (#971)" (#972)

This reverts commit dcb93f75e6.
This commit is contained in:
Christopher Chedeau 2020-03-16 00:38:37 -07:00 committed by GitHub
parent dcb93f75e6
commit db1f97f59e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 136 deletions

View file

@ -43,7 +43,6 @@ export type SocketUpdateDataSource = {
payload: {
socketID: string;
pointerCoords: { x: number; y: number };
username: string;
};
};
};
@ -360,93 +359,3 @@ export async function loadScene(id: string | null, privateKey?: string) {
appState: data.appState && { ...data.appState },
};
}
const ADJ = [
"aggressive",
"agreeable",
"ambitious",
"brave",
"calm",
"delightful",
"eager",
"faithful",
"gentle",
"happy",
"jolly",
"kind",
"lively",
"nice",
"obedient",
"polite",
"proud",
"silly",
"thankful",
"victorious",
"witty",
"wonderful",
"zealous",
];
const NOUN = [
"alligator",
"ant",
"bear",
"bee",
"bird",
"camel",
"cat",
"cheetah",
"chicken",
"chimpanzee",
"cow",
"crocodile",
"deer",
"dog",
"dolphin",
"duck",
"eagle",
"elephant",
"fish",
"fly",
"fox",
"frog",
"giraffe",
"goat",
"goldfish",
"hamster",
"hippopotamus",
"horse",
"kangaroo",
"kitten",
"lion",
"lobster",
"monkey",
"octopus",
"owl",
"panda",
"pig",
"puppy",
"rabbit",
"rat",
"scorpion",
"seal",
"shark",
"sheep",
"snail",
"snake",
"spider",
"squirrel",
"tiger",
"turtle",
"wolf",
"zebra",
];
export function createNameFromSocketId(socketId: string) {
const buf = new Buffer(socketId, "utf8");
return [
ADJ[buf.readUInt32LE(0) % ADJ.length],
NOUN[buf.readUInt32LE(4) % NOUN.length],
].join(" ");
}