Skip to content

Commit 53327e5

Browse files
committed
Various improvements
1 parent bb8e47c commit 53327e5

4 files changed

Lines changed: 395 additions & 403 deletions

File tree

experiments/Pentagon_Lattice_Geometry/main.js

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,12 @@ function rebuild() {
297297
try {
298298
const report = auditAdjacency(lattice);
299299
if (!report.ok) {
300-
console.warn(
301-
`[main] adjacency audit found problems after rebuild:`,
302-
{
303-
asymmetric: report.asymmetric.length,
304-
outOfRange: report.outOfRange.length,
305-
selfLoops: report.selfLoops.length,
306-
duplicates: report.duplicates.length,
307-
}
308-
);
300+
console.warn(`[main] adjacency audit found problems after rebuild:`, {
301+
asymmetric: report.asymmetric.length,
302+
outOfRange: report.outOfRange.length,
303+
selfLoops: report.selfLoops.length,
304+
duplicates: report.duplicates.length,
305+
});
309306
}
310307
// Expose for interactive debugging from the browser console.
311308
window.__lattice = lattice;
@@ -640,9 +637,9 @@ els.caClear.addEventListener('click', () => {
640637
// ---- Path tool wiring ----
641638
els.pathSetStart.addEventListener('click', () => {
642639
pathStartIdx = currentTileIdx;
643-
// After explicitly setting a start, keep the picker on 'end' so further
644-
// clicks (in path-pick mode) choose alternative endpoints.
645-
pathPickNext = 'end';
640+
// After explicitly setting a start, keep the picker on 'end' so further
641+
// clicks (in path-pick mode) choose alternative endpoints.
642+
pathPickNext = 'end';
646643
recomputePath();
647644
});
648645
els.pathSetEnd.addEventListener('click', () => {
@@ -701,17 +698,17 @@ window.addEventListener('mouseup', (e) => {
701698
const idx = view.pickTile(sx, sy);
702699
if (idx !== null) {
703700
if (els.pathMode.checked) {
704-
// Path-pick mode: first click sets the start, subsequent clicks
705-
// keep updating the end so alternative endpoints can be explored
706-
// without re-picking the start each time.
701+
// Path-pick mode: first click sets the start, subsequent clicks
702+
// keep updating the end so alternative endpoints can be explored
703+
// without re-picking the start each time.
707704
if (pathPickNext === 'start') {
708705
pathStartIdx = idx;
709706
pathEndIdx = null;
710707
pathPickNext = 'end';
711708
} else {
712709
pathEndIdx = idx;
713-
// Stay in 'end' mode: the next click re-selects the endpoint.
714-
pathPickNext = 'end';
710+
// Stay in 'end' mode: the next click re-selects the endpoint.
711+
pathPickNext = 'end';
715712
}
716713
currentTileIdx = idx;
717714
view.select(idx);
@@ -789,4 +786,4 @@ window.addEventListener('keydown', (e) => {
789786

790787
// initial build
791788
rebuild();
792-
initDocs();
789+
initDocs();

experiments/Pentagon_Lattice_Geometry/ngon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,4 +815,4 @@ export function buildPinwheel({ radius = 0, a = 2, b = 1, c = 1, hypotenuseSheet
815815
isSierpinski: false,
816816
isPinwheel: true,
817817
};
818-
}
818+
}

0 commit comments

Comments
 (0)