Skip to content

Commit

Permalink
adjust text position
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel authored Feb 21, 2020
1 parent 53b47a9 commit 1740a86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@
time = Clamp(time - 1/60, 0, maxTime); // update and clamp time

// show time
context.fillText(Math.ceil(time), 9,89); // draw time text
context.strokeText(Math.ceil(time), 9,89); // draw time text outline
context.fillText(Math.ceil(time), 9,99); // draw time text
context.strokeText(Math.ceil(time), 9,99); // draw time text outline

// show distance
context.textAlign = 'right'; // set right alignment for distance
context.fillText(0|playerPos.z/1e3, c.width-9, 89); // draw distance text
context.strokeText(0|playerPos.z/1e3, c.width-9, 89); // draw distance text outline
context.fillText(0|playerPos.z/1e3, c.width-9, 99); // draw distance text
context.strokeText(0|playerPos.z/1e3, c.width-9, 99); // draw distance text outline
}
else
{
Expand Down

0 comments on commit 1740a86

Please sign in to comment.