diff --git a/web-app/seafoam/src/index.html b/web-app/seafoam/src/index.html
index 3e09ebe..7d136d1 100644
--- a/web-app/seafoam/src/index.html
+++ b/web-app/seafoam/src/index.html
@@ -127,7 +127,8 @@
Your route is being generated. Please wait.
@@ -206,7 +207,8 @@
var highestDensityDist = Infinity;
console.log(padCoords.length / 3);
for (var i = 0; i < padCoords.length / 3; i++) {
- console.log(`Generating route... ${Math.floor(i / (padCoords.length / 3) * 100)}%`);
+ //console.log(`Generating route... ${Math.floor(i / (padCoords.length / 3) * 100)}%`);
+ //document.getElementById("routeout").innerHTML = `Generating route... ${Math.floor(i / (padCoords.length / 3) * 100)}%`;
const path = [];
path.push(padCoords[i * 3]);
path.push(padCoords[i * 3 + 1]);
@@ -235,7 +237,6 @@
//Include settable angle weighting later
weight = angleWeight * (Math.pow(dist, 2) + Math.pow(startdist, 1 * ((usedPads.length + 1) / desiredPathLength))) / ((gemDensity - 44) * 4);
- if (weight == Infinity) console.log("Infinity");
if (dist > 62) weight = Infinity;
weightChart.push(weight);
@@ -307,11 +308,11 @@
}
if (lowestWeight == Infinity) {
- console.log("Route blocked.");
+ //console.log("Route blocked.");
break;
}
if (lowestIndex == i) {
- console.log("Route complete.");
+ //console.log("Route complete.");
done = true;
break;
}
@@ -340,7 +341,7 @@
highestDensityPath = path;
highestDensityDist = avgDist;
}
- console.log(path.length / 3, density, avgDist);
+ //console.log(path.length / 3, density, avgDist);
}
//Choose between density and dist in settings as well though
var outPath = [];
@@ -362,8 +363,9 @@
if (i != outPath.length / 3 - 1) pathOutput += ",";
}
pathOutput += "]";
- document.getElementsByClassName("routeoutput")[0].innerHTML = pathOutput;
+ document.getElementById("routeout").innerHTML = pathOutput;
console.log(outPath.length / 3, outPathDensity, outPathDist);
+ document.getElementById("routestats").innerHTML = `Waypoints: ${outPath.length / 3}
Density: ${outPathDensity}
Distance: ${outPathDist}`;
return pathOutput, outPath.length / 3, outPathDensity, outPathDist;
}
var activeSquare = -1;
diff --git a/web-app/seafoam/src/styles.css b/web-app/seafoam/src/styles.css
index bb1af9e..f441d4a 100644
--- a/web-app/seafoam/src/styles.css
+++ b/web-app/seafoam/src/styles.css
@@ -294,4 +294,16 @@ label.anglesettings {
font-size: 1.2rem;
font-weight: 300;
user-select: text;
+}
+
+.routebox {
+ height: 10rem;
+ overflow: auto;
+}
+
+.routestats {
+ color: #ffffff;
+ font-size: 1.2rem;
+ font-weight: 300;
+ margin-top: 1rem;
}
\ No newline at end of file