MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / drawMousePosition

Function drawMousePosition

sketch.js:95–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95function drawMousePosition() {
96 let snappedX = mouseX - mouseX % 20;
97 let snappedY = mouseY - mouseY % 20;
98 push();
99
100
101 fill(255, 0, 0)
102 noStroke();
103 ellipse(snappedX, snappedY, 5);
104
105 if (mousePos1 != null) {
106 stroke(255, 0, 0)
107 strokeWeight(5)
108 line(mousePos1.x, mousePos1.y, snappedX, snappedY)
109 }
110
111 pop();
112}
113
114let levelNumber = 0;
115

Callers 1

drawFunction · 0.70

Calls 1

lineFunction · 0.85

Tested by

no test coverage detected