Ejemplo n.º 1
0
func main() {
	count := uint(30)
	width := uint(1920)
	height := uint(1080)
	flag.UintVar(&count, "framecnt", count, "Frames generated per simulation packet")
	flag.UintVar(&width, "width", width, "Width of output surface")
	flag.UintVar(&height, "height", height, "Height of output surface")
	flag.Parse()

	yard := ext.StdExtensions()
	shapes := animate.StdShapes
	groups := animate.StdGroupFacts

	fact := animate.RenderFactory{}
	fact.Width = width
	fact.Height = height
	fact.Yard = yard
	fact.Framecnt = count
	fact.EntShapes = shapes
	fact.EntGroups = groups
	frtun := runFrameTunnel(fact)

	for frch := range frtun {
		for fr := range frch {
			werr := animate.WriteFrame(fr, os.Stdout)
			if werr != nil {
				fmt.Fprintf(os.Stderr, "Warning: %v", werr)
			}
		}
	}
}