Files
architype/render.js

21 lines
404 B
JavaScript
Raw Normal View History

2019-07-03 22:10:36 +00:00
addEventListener('message', (e) => {
if (e.data.command == 'ping') {
postMessage({
command: 'pong',
});
return;
}
2019-07-03 22:10:36 +00:00
let graph = new Graph(e.data);
let layout = new Layout(graph);
2019-07-03 22:10:36 +00:00
postMessage({
generation: e.data.generation,
steps: layout.getDrawSteps(),
});
});
2019-07-03 03:24:15 +00:00
<!--# include file="Graph.js" -->
<!--# include file="Layout.js" -->
2019-07-03 22:10:36 +00:00
<!--# include file="utils.js" -->