Skip to content

Instantly share code, notes, and snippets.

@abhijithanilkumar
Last active March 13, 2016 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhijithanilkumar/69c7d3af45be6fb5ebb9 to your computer and use it in GitHub Desktop.
Save abhijithanilkumar/69c7d3af45be6fb5ebb9 to your computer and use it in GitHub Desktop.
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