chore: cleanup edge and node code
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m8s

This commit is contained in:
2025-12-02 16:59:43 +01:00
parent 4878d02705
commit ca8b1e15ac
2 changed files with 8 additions and 13 deletions

View File

@@ -45,18 +45,17 @@
let mesh = $state<Mesh>();
let lastId: number | null = null;
const primeA = 31;
const primeB = 37;
let lastId: string | null = null;
function update() {
const new_x = to.x - from.x;
const new_y = to.y - from.y;
const curveId = new_x * primeA + new_y * primeB;
const curveId = `${from.x}-${from.y}-${to.x}-${to.y}`;
if (lastId === curveId) {
return;
}
lastId = curveId;
const length = Math.floor(
Math.sqrt(Math.pow(new_x, 2) + Math.pow(new_y, 2)) / 4,