mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 00:53:08 +00:00 
			
		
		
		
	poc: improve forces on galaxy simulation
This commit is contained in:
		| @@ -80,12 +80,21 @@ exportToHtml("loadGalaxy", async (config: GalaxyConfig) => { | |||||||
|       fit: false, |       fit: false, | ||||||
|       ungrabifyWhileSimulating: true, |       ungrabifyWhileSimulating: true, | ||||||
|       fixedAfterDragging: true, |       fixedAfterDragging: true, | ||||||
|  |  | ||||||
|       linkId: (node) => { |       linkId: (node) => { | ||||||
|         return node.id; |         return node.id; | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       linkDistance: (link) => { |       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: () => { |       stop: () => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user