mirror of
https://github.com/DoomKitty87/seafoam.git
synced 2024-12-28 16:06:39 +01:00
added dependency files
This commit is contained in:
parent
1396f429b3
commit
4cebee2f04
3 changed files with 20702 additions and 4 deletions
10349
web-app/seafoam/src/assets/densitylistv3.txt
Normal file
10349
web-app/seafoam/src/assets/densitylistv3.txt
Normal file
File diff suppressed because it is too large
Load diff
10349
web-app/seafoam/src/assets/padsv3.txt
Normal file
10349
web-app/seafoam/src/assets/padsv3.txt
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2,14 +2,14 @@ const fs = require('fs');
|
||||||
|
|
||||||
const overallPads = [];
|
const overallPads = [];
|
||||||
// Loading etherwarp pad coordinates
|
// Loading etherwarp pad coordinates
|
||||||
const padFile = fs.readFileSync('padsv3.txt', 'utf8');
|
const padFile = fs.readFileSync('assets/padsv3.txt', 'utf8');
|
||||||
const padLines = padFile.trim().split('\n');
|
const padLines = padFile.trim().split('\n');
|
||||||
for (const line of padLines) {
|
for (const line of padLines) {
|
||||||
const [x, y, z] = line.split(' ').map(Number);
|
const [x, y, z] = line.split(' ').map(Number);
|
||||||
overallPads.push(x, y, z);
|
overallPads.push(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
const gemstoneData = fs.readFileSync('blockarraydatav3.txt', 'utf8');
|
const gemstoneData = fs.readFileSync('assets/blockarraydatav3.txt', 'utf8');
|
||||||
const blockData = [];
|
const blockData = [];
|
||||||
const lines = gemstoneData.trim().split('\n');
|
const lines = gemstoneData.trim().split('\n');
|
||||||
for (let x = 0; x < 622; x++) {
|
for (let x = 0; x < 622; x++) {
|
||||||
|
@ -22,7 +22,7 @@ for (let x = 0; x < 622; x++) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const gemDensities = [];
|
const gemDensities = [];
|
||||||
const densityFile = fs.readFileSync('densitylistv3.txt', 'utf8');
|
const densityFile = fs.readFileSync('assets/densitylistv3.txt', 'utf8');
|
||||||
const densityLines = densityFile.trim().split('\n');
|
const densityLines = densityFile.trim().split('\n');
|
||||||
for (const line of densityLines) {
|
for (const line of densityLines) {
|
||||||
gemDensities.push(Number(line));
|
gemDensities.push(Number(line));
|
||||||
|
@ -201,7 +201,7 @@ async function generateRoute(sector, allowedOOB) {
|
||||||
const outPath = lowestAvgDistPath;
|
const outPath = lowestAvgDistPath;
|
||||||
const outPathDensity = lowestAvgDistDensity;
|
const outPathDensity = lowestAvgDistDensity;
|
||||||
const outPathDist = lowestAvgDist;
|
const outPathDist = lowestAvgDist;
|
||||||
|
|
||||||
var pathOutput = "[";
|
var pathOutput = "[";
|
||||||
for (var i = 0; i < outPath.length / 3; i++) {
|
for (var i = 0; i < outPath.length / 3; i++) {
|
||||||
pathOutput += "{\"x\":" + outPath[i * 3] + ",\"y\":" + outPath[i * 3 + 1] + ",\"z\":" + outPath[i * 3 + 2] + ",\"r\":0,\"g\":1,\"b\":0,\"options\":{\"name\":\"" + (i + 1) + "\"}}";
|
pathOutput += "{\"x\":" + outPath[i * 3] + ",\"y\":" + outPath[i * 3 + 1] + ",\"z\":" + outPath[i * 3 + 2] + ",\"r\":0,\"g\":1,\"b\":0,\"options\":{\"name\":\"" + (i + 1) + "\"}}";
|
||||||
|
|
Loading…
Reference in a new issue