poc: improve forces on galaxy simulation

This commit is contained in:
2025-09-10 11:34:56 +02:00
parent 8e4d0da62e
commit 3f14343b99

View File

@@ -80,12 +80,21 @@ exportToHtml("loadGalaxy", async (config: GalaxyConfig) => {
fit: false,
ungrabifyWhileSimulating: true,
fixedAfterDragging: true,
linkId: (node) => {
return node.id;
},
linkDistance: (link) => {
return link?.value * 1000;
return elements.nodes.length * 10;
},
linkStrength: (link) => {
return 1 / Math.max(1, link?.value);
},
manyBodyStrength: (node) => {
return node?.mass;
},
stop: () => {