Files
Pixelcanvas.io-overlay/debugger/coordinates.js
T
2025-02-09 15:46:27 +01:00

13 lines
262 B
JavaScript

const cords = document.getElementById("coordinates");
function updateCords(x, y) {
cords.textContent = `(${Math.round(x)}, ${Math.round(y)})`;
}
updateCords(0, 1000);
window.addEventListener("mousemove", event => {
updateCords(event.x, event.y);
});