Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ <h1>Please enter your username</h1>
<path id="path" d="M50,17a33,33 0 1,1 0,66a33,33 0 1,1 0,-66" />
</defs>
<path class="cursor" d="M50 10 l-2 -4 l4 0 z" />
<text fill="#fff" font-size="5" font-family="monospace" letter-spacing="2.74">
<textPath href="#path" />
<text fill="#fff" font-size="5" font-family="monospace">
<textPath href="#path"/>
</text>
<circle class="grab" cx="50" cy="50" r="40" />
<circle cx="50" cy="50" r="30" />
Expand Down
3 changes: 3 additions & 0 deletions lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const textPath = lock.querySelector("textPath");
const clearButton = document.querySelector(".clear");
const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

const pathLengthMinusOneLetter = path.getTotalLength() - ((path.getTotalLength() / charset.length) / 2)
textPath.setAttribute('textLength', pathLengthMinusOneLetter)

let partialValue = "";
let offsetAngle = null;
let oldAngle = -2.7;
Expand Down