This commit is contained in:
2023-08-01 21:39:14 +02:00
parent 33c0fac84b
commit 9a482a9610

View File

@@ -183,7 +183,7 @@ window.addEventListener("load", () => {
window.addEventListener("click", (event) => {
const x = Math.round(event.clientX / spacing);
const y = Math.round(event.clientY / spacing);
saveSetArray(sparseWorld, y,x, 1);
saveSetArray(sparseWorld, y, x, 1);
console.log(`Koordinaten: (${x}, ${y})`);
});
@@ -204,7 +204,7 @@ window.addEventListener("load", () => {
// Verarbeite das Dragging hier (z. B. zeichne etwas in Canvas)
const x = Math.round(currentX / spacing);
const y = Math.round(currentY / spacing);
console.log("Values: " + x + " " + y )
console.log("Values: " + x + " " + y)
saveSetArray(sparseWorld, y, x, 1);
startX = currentX;
@@ -237,7 +237,7 @@ window.addEventListener("load", () => {
// Verarbeite das Dragging hier (z. B. zeichne etwas in Canvas)
const x = Math.round(currentX / spacing);
const y = Math.round(currentY / spacing);
console.log("Values: " + x + " " + y )
console.log("Values: " + x + " " + y)
saveSetArray(sparseWorld, y, x, 1);
// Verarbeite die Koordinaten hier (z. B. zeichne etwas im Canvas)