Skip to content

Commit

Permalink
Adjust d3 forces #15
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 20, 2024
1 parent 7e2e92e commit 7956ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@

// # Add forces to the graph
// Dynamic collision radius based on node type
Graph.d3Force('collide', d3.forceCollide().radius(node => node.type === 'instance' ? 60 : 42))
Graph.d3Force('collide', d3.forceCollide().radius(node => node.type === 'instance' ? instanceSizeMultiplier : avatarSizeMultiplier / 2 + 7 * Math.sqrt(node.connectionCount))
// Increased repulsive force
.d3Force('charge', d3.forceManyBody().strength(-42000))
// Increased distance and adjusted strength for links
Expand Down

0 comments on commit 7956ed3

Please sign in to comment.