MCPcopy Create free account
hub / github.com/GoogleChrome/samples / draw

Function draw

idle-detection/script.mjs:64–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62};
63
64const 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
79const resizeCanvas = () => {
80 canvas.width = window.innerWidth;

Callers 1

script.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected