microboard-temp 0.5.90 → 0.5.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.js +15 -5
- package/dist/cjs/index.js +15 -5
- package/dist/cjs/node.js +15 -5
- package/dist/esm/browser.js +15 -5
- package/dist/esm/index.js +15 -5
- package/dist/esm/node.js +15 -5
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -36968,14 +36968,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
36968
36968
|
return [];
|
|
36969
36969
|
}
|
|
36970
36970
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
36971
|
-
const
|
|
36972
|
-
const startPoint = newStart || start;
|
|
36973
|
-
const endPoint = newEnd || end;
|
|
36971
|
+
const tempGridInfo = createGrid(start, end);
|
|
36972
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
36973
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
36974
36974
|
const startDir = getPointerDirection(start);
|
|
36975
36975
|
const endDir = getPointerDirection(end);
|
|
36976
36976
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
36977
|
-
const
|
|
36978
|
-
const
|
|
36977
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
36978
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
36979
|
+
const finalStart = newStart || start;
|
|
36980
|
+
const finalEnd = newEnd || end;
|
|
36981
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
36982
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
36983
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
36984
|
+
acc.push(p3);
|
|
36985
|
+
}
|
|
36986
|
+
return acc;
|
|
36987
|
+
}, []);
|
|
36988
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
36979
36989
|
console.log("RESULT", {
|
|
36980
36990
|
lines: getLines(pathPoints),
|
|
36981
36991
|
newStart,
|
package/dist/cjs/index.js
CHANGED
|
@@ -36968,14 +36968,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
36968
36968
|
return [];
|
|
36969
36969
|
}
|
|
36970
36970
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
36971
|
-
const
|
|
36972
|
-
const startPoint = newStart || start;
|
|
36973
|
-
const endPoint = newEnd || end;
|
|
36971
|
+
const tempGridInfo = createGrid(start, end);
|
|
36972
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
36973
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
36974
36974
|
const startDir = getPointerDirection(start);
|
|
36975
36975
|
const endDir = getPointerDirection(end);
|
|
36976
36976
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
36977
|
-
const
|
|
36978
|
-
const
|
|
36977
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
36978
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
36979
|
+
const finalStart = newStart || start;
|
|
36980
|
+
const finalEnd = newEnd || end;
|
|
36981
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
36982
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
36983
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
36984
|
+
acc.push(p3);
|
|
36985
|
+
}
|
|
36986
|
+
return acc;
|
|
36987
|
+
}, []);
|
|
36988
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
36979
36989
|
console.log("RESULT", {
|
|
36980
36990
|
lines: getLines(pathPoints),
|
|
36981
36991
|
newStart,
|
package/dist/cjs/node.js
CHANGED
|
@@ -39441,14 +39441,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
39441
39441
|
return [];
|
|
39442
39442
|
}
|
|
39443
39443
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
39444
|
-
const
|
|
39445
|
-
const startPoint = newStart || start;
|
|
39446
|
-
const endPoint = newEnd || end;
|
|
39444
|
+
const tempGridInfo = createGrid(start, end);
|
|
39445
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
39446
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
39447
39447
|
const startDir = getPointerDirection(start);
|
|
39448
39448
|
const endDir = getPointerDirection(end);
|
|
39449
39449
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
39450
|
-
const
|
|
39451
|
-
const
|
|
39450
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
39451
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
39452
|
+
const finalStart = newStart || start;
|
|
39453
|
+
const finalEnd = newEnd || end;
|
|
39454
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
39455
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
39456
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
39457
|
+
acc.push(p3);
|
|
39458
|
+
}
|
|
39459
|
+
return acc;
|
|
39460
|
+
}, []);
|
|
39461
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
39452
39462
|
console.log("RESULT", {
|
|
39453
39463
|
lines: getLines(pathPoints),
|
|
39454
39464
|
newStart,
|
package/dist/esm/browser.js
CHANGED
|
@@ -36813,14 +36813,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
36813
36813
|
return [];
|
|
36814
36814
|
}
|
|
36815
36815
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
36816
|
-
const
|
|
36817
|
-
const startPoint = newStart || start;
|
|
36818
|
-
const endPoint = newEnd || end;
|
|
36816
|
+
const tempGridInfo = createGrid(start, end);
|
|
36817
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
36818
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
36819
36819
|
const startDir = getPointerDirection(start);
|
|
36820
36820
|
const endDir = getPointerDirection(end);
|
|
36821
36821
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
36822
|
-
const
|
|
36823
|
-
const
|
|
36822
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
36823
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
36824
|
+
const finalStart = newStart || start;
|
|
36825
|
+
const finalEnd = newEnd || end;
|
|
36826
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
36827
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
36828
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
36829
|
+
acc.push(p3);
|
|
36830
|
+
}
|
|
36831
|
+
return acc;
|
|
36832
|
+
}, []);
|
|
36833
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
36824
36834
|
console.log("RESULT", {
|
|
36825
36835
|
lines: getLines(pathPoints),
|
|
36826
36836
|
newStart,
|
package/dist/esm/index.js
CHANGED
|
@@ -36806,14 +36806,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
36806
36806
|
return [];
|
|
36807
36807
|
}
|
|
36808
36808
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
36809
|
-
const
|
|
36810
|
-
const startPoint = newStart || start;
|
|
36811
|
-
const endPoint = newEnd || end;
|
|
36809
|
+
const tempGridInfo = createGrid(start, end);
|
|
36810
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
36811
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
36812
36812
|
const startDir = getPointerDirection(start);
|
|
36813
36813
|
const endDir = getPointerDirection(end);
|
|
36814
36814
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
36815
|
-
const
|
|
36816
|
-
const
|
|
36815
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
36816
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
36817
|
+
const finalStart = newStart || start;
|
|
36818
|
+
const finalEnd = newEnd || end;
|
|
36819
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
36820
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
36821
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
36822
|
+
acc.push(p3);
|
|
36823
|
+
}
|
|
36824
|
+
return acc;
|
|
36825
|
+
}, []);
|
|
36826
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
36817
36827
|
console.log("RESULT", {
|
|
36818
36828
|
lines: getLines(pathPoints),
|
|
36819
36829
|
newStart,
|
package/dist/esm/node.js
CHANGED
|
@@ -39274,14 +39274,24 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
|
|
|
39274
39274
|
return [];
|
|
39275
39275
|
}
|
|
39276
39276
|
function findOrthogonalPath(start, end, obstacles, toVisitPoints = []) {
|
|
39277
|
-
const
|
|
39278
|
-
const startPoint = newStart || start;
|
|
39279
|
-
const endPoint = newEnd || end;
|
|
39277
|
+
const tempGridInfo = createGrid(start, end);
|
|
39278
|
+
const startPoint = tempGridInfo.newStart || start;
|
|
39279
|
+
const endPoint = tempGridInfo.newEnd || end;
|
|
39280
39280
|
const startDir = getPointerDirection(start);
|
|
39281
39281
|
const endDir = getPointerDirection(end);
|
|
39282
39282
|
const hookWaypoints = createHookWaypoints(startPoint, endPoint, startDir, endDir);
|
|
39283
|
-
const
|
|
39284
|
-
const
|
|
39283
|
+
const allWaypoints = [...hookWaypoints, ...toVisitPoints];
|
|
39284
|
+
const { grid, newStart, newEnd } = createGrid(start, end, allWaypoints);
|
|
39285
|
+
const finalStart = newStart || start;
|
|
39286
|
+
const finalEnd = newEnd || end;
|
|
39287
|
+
const points = [finalStart, ...allWaypoints, finalEnd];
|
|
39288
|
+
const uniquePoints = points.reduce((acc, p3) => {
|
|
39289
|
+
if (!acc.some((existing) => existing.barelyEqual(p3))) {
|
|
39290
|
+
acc.push(p3);
|
|
39291
|
+
}
|
|
39292
|
+
return acc;
|
|
39293
|
+
}, []);
|
|
39294
|
+
const pathPoints = findPathPoints(uniquePoints, grid, obstacles, newStart, newEnd);
|
|
39285
39295
|
console.log("RESULT", {
|
|
39286
39296
|
lines: getLines(pathPoints),
|
|
39287
39297
|
newStart,
|