Skip to content

Commit

Permalink
Stabilisation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rrmerugu committed May 30, 2021
1 parent f398b6e commit def3207
Showing 1 changed file with 50 additions and 26 deletions.
76 changes: 50 additions & 26 deletions src/settings/networkOptions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
import {STUDIO_SETTINGS} from "./index";


const getPhysicsSettings = {

forceAtlas2Based: {
gravitationalConstant: -56,
centralGravity: 0.005,
springLength: STUDIO_SETTINGS.RENDERING_EDGES_SETTINGS.length,
springConstant: 0.18,
avoidOverlap: 1.5
},
maxVelocity: 146,
solver: 'forceAtlas2Based',
timestep: 0.35,
stabilization: {
enabled: true,
iterations: 1000,
updateInterval: 50,
fit: true
}

}

const defaultOptions = {
// layout: {
// hierarchical: false
Expand All @@ -17,32 +38,35 @@ const defaultOptions = {
hierarchical: false

},
physics: {
forceAtlas2Based: {
gravitationalConstant: -70,
centralGravity: 0.005,
springLength: STUDIO_SETTINGS.RENDERING_EDGES_SETTINGS.length,
springConstant: 0.18,
avoidOverlap: 1
},
// maxVelocity: 146,
solver: "forceAtlas2Based", // forceAtlas2Based
// timestep: 0.55,
stabilization: {
enabled: true,
// updateInterval: 100,
// iterations: 1000 // YMMV
},
minVelocity: undefined
// barnesHut: {
// gravitationalConstant: -23000,
// centralGravity: 0,
// springLength: 0,
// springConstant: 0.5,
// damping: 1,
// avoidOverlap: 1
// }
},

physics: getPhysicsSettings,

// physics: {
// forceAtlas2Based: {
// gravitationalConstant: -70,
// centralGravity: 0.005,
// springLength: STUDIO_SETTINGS.RENDERING_EDGES_SETTINGS.length,
// springConstant: 0.18,
// avoidOverlap: 1
// },
// // maxVelocity: 146,
// solver: "forceAtlas2Based", // forceAtlas2Based
// // timestep: 0.55,
// stabilization: {
// enabled: true,
// // updateInterval: 100,
// // iterations: 1000 // YMMV
// },
// minVelocity: undefined
// // barnesHut: {
// // gravitationalConstant: -23000,
// // centralGravity: 0,
// // springLength: 0,
// // springConstant: 0.5,
// // damping: 1,
// // avoidOverlap: 1
// // }
// },

// layout: {
// hierarchical: {
Expand Down

0 comments on commit def3207

Please sign in to comment.