Created
June 20, 2011 19:18
-
-
Save RC1140/1036344 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script language="javascript" type="text/javascript" src="http://localhost/arbor/lib/arbor.js" ></script> | |
<script language="javascript" type="text/javascript" src="http://localhost/arbor/demos/_/graphics.js" ></script> | |
<script language="javascript" type="text/javascript" src="http://localhost/arbor/demos/halfviz/src/renderer.js" ></script> | |
</head> | |
<body> | |
<canvas id="viewport" width="800" height="600"></canvas> | |
<script language="javascript" type="text/javascript"> | |
var sys = arbor.ParticleSystem(1000, 400,1); | |
sys.parameters({gravity:true}); | |
sys.renderer = Renderer("#viewport") ; | |
var data = { | |
nodes:{ | |
animals:{'color':'red','shape':'dot','label':'Animals'}, | |
dog:{'color':'green','shape':'dot','label':'dog'}, | |
cat:{'color':'blue','shape':'dot','label':'cat'} | |
}, | |
edges:{ | |
animals:{ dog:{}, cat:{} } | |
} | |
}; | |
sys.graft(data); | |
setTimeout(function(){ | |
var postLoadData = { | |
nodes:{ | |
joe:{'color':'orange','shape':'dot','label':'joe'}, | |
fido:{'color':'green','shape':'dot','label':'fido'}, | |
fluffy:{'color':'blue','shape':'dot','label':'fluffy'} | |
}, | |
edges:{ | |
dog:{ fido:{} }, | |
cat:{ fluffy:{} }, | |
joe:{ fluffy:{},fido:{} } | |
} | |
}; | |
sys.graft(postLoadData); | |
},10000); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please ensure that you change the paths to suit your local setup