var data = {nodes: [], links: []}
this.data = data
var morphs = {}
var index = 0;
$world.withAllSubmorphsDo(function(ea) {
var node = {name: ea.name || ea.constructor.name , index: index++}
morphs[ea.id] = node;
data.nodes[node.index] = node
if (ea.owner) {
data.links.push({
source: morphs[ea.owner.id].index, target: morphs[ea.id].index, weight: 1})
}
})
this.draw()