Permalink
Browse files

Moved radius calculation to generator and added more asset metadata

  • Loading branch information...
Munter committed Jan 24, 2013
1 parent 26ab775 commit dc8c13b4eb16300cabcdb3e28390ac9dff302861
Showing with 5 additions and 1 deletion.
  1. +5 −1 index.js
View
@@ -51,7 +51,10 @@ module.exports = function (name) {
path: asset.url ? Path.relative(assetGraph.root, asset.url) : '',
fileName: (asset.url ? Path.basename(asset.url) : 'i:' + asset).replace(/"/g, '\\"'),
type: asset.type.toLowerCase(),
- size: asset.rawSrc.length
+ size: asset.rawSrc.length,
+ r: 3 + Math.sqrt(asset.rawSrc.length / 100),
+ outgoing: 0,
+ initial: asset.isInitial
});
idx += 1;
}
@@ -63,6 +66,7 @@ module.exports = function (name) {
if (typeof typeString === 'function') {
typeString = typeString(relation);
}
+ data.assets[relation.from.idx].outgoing += 1;
data.relations.push({
source: relation.from.idx,
target: relation.to.idx,

0 comments on commit dc8c13b

Please sign in to comment.