Last active
May 6, 2016 22:00
-
-
Save keithwhor/6260d489b43048cc0ebf to your computer and use it in GitHub Desktop.
Extended minecraft graph example
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
// Add even more nodes | |
let mojang = new Node('company', {name: 'Mojang'}); | |
let microsoft = new Node('company', {name: 'Microsoft'}); | |
let jennifer = new Node('person', {name: 'Jennifer'}); | |
new Edge('founded').link(notch, mojang); | |
new Edge('acquired').link(microsoft, mojang); | |
new Edge('purchased').link(jennifer, minecraft); | |
new Edge('prints_money_for').link(minecraft, microsoft); | |
/* | |
Our new graph... | |
Jennifer | |
| (purchased) | |
v | |
Joe --(likes)--> Minecraft <--(created)-- Notch | |
(prints_money_for) | | (founded) | |
v v | |
Microsoft --(acquired)--> Mojang | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment