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