graphs
package managers
and one million vertices
requestAnimationFrame(frame)
requestAnimationFrame(frame)
function frame() {
}
requestAnimationFrame(frame)
function frame() {
// Keep calling us:
requestAnimationFrame(frame)
}
requestAnimationFrame(frame)
function frame() {
// Keep calling us:
requestAnimationFrame(frame)
// Update your scene here
}
function frame() {
requestAnimationFrame(frame)
renderParticles()
// 16 ms
}
Reduce intersections
Bad
Good
Same length
Bad
Good
Symmetry
Bad
Good
var layout = require('ngraph.forcelayout')(graph)
var layout = require('ngraph.forcelayout')(graph)
layout.step()
var layout = require('ngraph.forcelayout')(graph)
layout.step()
layout.getNodePosition(nodeId)
function frame() {
requestAnimationFrame(frame)
layout.step()
renderGraph()
// 16 ms
}
function frame() {
// 16 ms
}
function frame() {
requestAnimationFrame(frame)
// layout.step()
renderGraph()
}
function frame() {
requestAnimationFrame(frame)
// layout.step()
renderGraph()
}
Server
var layout = require('ngraph.forcelayout')(graph)
while (!done) {
layout.step()
}
saveToDisk()
Browser
function frame() {
requestAnimationFrame(frame)
renderGraph()
}
composer
64,123
gems
89,450
npm
163,184
go
182,215