mirror of
https://github.com/ae-utbm/sith.git
synced 2025-09-12 19:15:43 +00:00
poc: improve forces on galaxy simulation
This commit is contained in:
@@ -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: () => {
|
||||
|
Reference in New Issue
Block a user