()
| 62 | }; |
| 63 | |
| 64 | const draw = () => { |
| 65 | if (pressed) { |
| 66 | ctx.beginPath(); |
| 67 | ctx.arc( |
| 68 | curX, |
| 69 | curY, |
| 70 | 25, |
| 71 | 0, |
| 72 | Two_π |
| 73 | ); |
| 74 | ctx.fill(); |
| 75 | } |
| 76 | requestAnimationFrame(draw); |
| 77 | }; |
| 78 | |
| 79 | const resizeCanvas = () => { |
| 80 | canvas.width = window.innerWidth; |