diff options
Diffstat (limited to 'test-client')
| -rw-r--r-- | test-client/visual.ts | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/test-client/visual.ts b/test-client/visual.ts index 59734234..a54ca143 100644 --- a/test-client/visual.ts +++ b/test-client/visual.ts @@ -221,10 +221,11 @@ function draw_message(m: MessageData) {          ctx.closePath()          ctx.fill() +        const t = m.timeout.remaining / m.timeout.initial;          ctx.beginPath() -        ctx.strokeStyle = "red" +        ctx.strokeStyle = `hsl(${Math.sqrt(t) * 0.3}turn, 100%, 50%)`          ctx.lineWidth = 0.1 -        ctx.arc(0, -1, 0.45, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * (1 - m.timeout.remaining / m.timeout.initial)) +        ctx.arc(0, -1, 0.45, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * (1 - t))          ctx.stroke()          ctx.translate(0, -1)  |