Exemple #1
0
func main() {
	app.Run(app.Callbacks{
		Start: start,
		Stop:  stop,
		Draw:  draw,
	})
}
Exemple #2
0
func main() {
	app.Run(app.Callbacks{
		Start: onStart,
		Stop:  onStop,
		Draw:  onDraw,
	})
}
Exemple #3
0
func main() {
	app.Run(app.Callbacks{
		Start: start,
		Draw:  draw,
		Stop:  stop,
		Touch: touch,
	})
}
Exemple #4
0
func main() {
	// checkNetwork runs only once when the app first loads.
	go checkNetwork()

	app.Run(app.Callbacks{
		Draw: draw,
	})
}
Exemple #5
0
func main() {
	// TODO(jbd): Handle touch to turn on/off the beats.
	app.Run(app.Callbacks{
		Start: start,
		Stop:  stop,
		Draw:  draw,
		Touch: touch,
	})
}
Exemple #6
0
func main() {
	app.Run(app.Callbacks{
		Draw: func() {
			gl.ClearColor(0, 0, 1, 1) // blue
			gl.Clear(gl.COLOR_BUFFER_BIT)
		},
		Touch: func(e event.Touch) { fmt.Println(e) },
	})
}
Exemple #7
0
func main() {
	app.Run(app.Callbacks{
		Start:  start,
		Stop:   stop,
		Draw:   draw,
		Touch:  touch,
		Config: config,
	})
}
Exemple #8
0
func main() {
	e := Engine{}
	app.Run(app.Callbacks{
		Start:  e.Start,
		Stop:   e.Stop,
		Draw:   e.Draw,
		Touch:  e.Touch,
		Config: e.Config,
	})
}
Exemple #9
0
func main() {
	app.Run(app.Callbacks{
		Draw: func() {
			if scene == nil {
				loadScene(40)
			}

			now := clock.Time(time.Since(start) * 60 / time.Second)
			if now == lastClock {
				return
			}
			lastClock = now

			eng.Render(scene, now)
		},
		Touch: func(e event.Touch) {
			if e.Type != event.TouchStart {
				return
			}

			eng.SetSubTex(kn, loadTexture((int(e.Loc.X) * (int(e.Loc.Y/25) + 1))))
		},
	})
}
Exemple #10
0
func main() {
	app := cli.NewApp()
	app.Usage = "Start a REx Demo server"
	app.Action = AppMain
	app.Run(os.Args)
}
Exemple #11
0
func main() {
	app.Run(app.Callbacks{})
}
Exemple #12
0
func main() {
	app.Run(app.Callbacks{
		Draw: draw,
	})
}
Exemple #13
0
func main() {
	app.Run(app.Callbacks{
		Draw:  draw,
		Touch: touch,
	})
}
Exemple #14
0
func main() {
	app.Run(app.Callbacks{Start: java.Init})
}