func (e *Emulator) Init() {
	e.leds = make([]color.Color, e.Width*e.Height)
	e.wg.Add(1)
	go driver.Main(e.mainWindowLoop)
	e.wg.Wait()
}
Init initialize the emulator, creating a new Window and waiting until is
painted. If something goes wrong the function panics
package emulator
import (
	"fmt"
	"image"
	"image/color"
	"os"
	"sync"
	"golang.org/x/exp/shiny/driver"
	"golang.org/x/exp/shiny/screen"
	"golang.org/x/mobile/event/paint"
	"golang.org/x/mobile/event/size"
)
const DefaultPixelPitch = 12
const windowTitle = "RGB led matrix emulator"
type Emulator struct {
	PixelPitch              int
	Gutter                  int
	Width                   int
	Height                  int
	GutterColor             color.Color
	PixelPitchToGutterRatio int
	Margin                  int
	leds []color.Color
	w    screen.Window
	s    screen.Screen
	wg   sync.WaitGroup
	isReady bool
}
func NewEmulator(w, h, pixelPitch int, autoInit bool) *Emulator {
	e := &Emulator{
		Width:                   w,
		Height:                  h,
		GutterColor:             color.Gray{Y: 20},
		PixelPitchToGutterRatio: 2,
		Margin:                  10,
	}
	e.updatePixelPitchForGutter(pixelPitch / e.PixelPitchToGutterRatio)
	if autoInit {
		e.Init()
	}
	return e
}