Last active
March 13, 2016 17:31
-
-
Save abhijithanilkumar/69c7d3af45be6fb5ebb9 to your computer and use it in GitHub Desktop.
This file contains 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
using ThreeJS | |
using Escher | |
using LightGraphs | |
using NetworkViz | |
g = CompleteGraph(10) | |
drawGraph(g,1) | |
@show typeof(g) | |
main(window) = begin | |
start = true | |
push!(window.assets, "widgets") | |
push!(window.assets,("ThreeJS","threejs")) | |
inp = Signal(Dict()) | |
s = Escher.sampler() | |
form = vbox( | |
trigger!(s, :submit, button("BFS")), | |
) |> maxwidth(400px) | |
map(inp) do dict | |
vbox( | |
intent(s,form) >>> inp, | |
vskip(2em), | |
) | |
drawIt(start) | |
start = false | |
end | |
end | |
function drawIt(start) | |
if start | |
drawGraph(g,1) | |
else | |
drawGraph(bfs_tree(g),1) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment