Пример #1
0
func NewState() *State {
	state := &State{}

	state.Backend = ui.NewGLBackend()
	state.Input = &ui.Input{}
	state.SidePanelSize = 350

	state.Box = ui.Pt(10, 10)

	return state
}
Пример #2
0
func NewState() *State {
	state := &State{}
	state.Handler.Timeline = &state.Timeline
	state.Simulator = simulator.NewStream()

	state.Simulator.Start()
	state.Dirty = true

	state.Backend = ui.NewGLBackend()
	state.Time = time.Now()
	state.Input = &ui.Input{}

	return state
}