diff --git a/src/app.js b/src/app.js index f96d2a1276caced36016b3b31b0e50adb2e2141e..182e95705fdbbd4697f0e5f25729ea58dfa4019d 100644 --- a/src/app.js +++ b/src/app.js @@ -7,6 +7,7 @@ import * as canvas from "./canvas.js" import * as HTML from "./elements.js" import { connect } from "./room.js" import * as toolSelection from "./tool-selection.js" +import * as humanhash from "humanhash" const TEST_ROOM = "imperial" @@ -31,6 +32,8 @@ const getPressureFactor = (pressure) => { let room = null +const humanHasher = new humanhash() + const onRoomConnect = (room_) => { room = room_ @@ -179,8 +182,7 @@ const getOrInsertPeerById = (id) => { peerId.id = id - const humanhash = new (require("humanhash"))() - peerId.innerHTML = humanhash.humanize(id, 2) + peerId.innerHTML = humanHasher.humanize(id, 2) peerElem.appendChild(avatarImage) peerElem.appendChild(quality)