whispervis/main.go

26 lines
426 B
Go
Raw Normal View History

2018-09-05 16:53:09 +03:00
package main
import (
"bytes"
"github.com/divan/graphx/formats"
"github.com/gopherjs/vecty"
)
func main() {
buf := bytes.NewBuffer(inputJSON)
data, err := formats.FromD3JSONReader(buf)
if err != nil {
panic(err)
}
2018-09-06 18:37:46 +03:00
page := NewPage(data, 50)
2018-09-05 16:53:09 +03:00
vecty.SetTitle("Whisper Simulation")
vecty.AddStylesheet("css/pure-min.css")
vecty.AddStylesheet("css/controls.css")
vecty.RenderBody(page)
2018-09-06 11:45:13 +03:00
2018-09-06 18:37:46 +03:00
page.StartSimulation()
2018-09-05 16:53:09 +03:00
}