func (c *Canvas) AppendElement() {
	c.body.Call("appendChild", c.canvas)
}
AppendElement append the canvas element to the body
package canvas
import (
	"math"
	"syscall/js"
	"time"
	"github.com/go-playground/colors"
	"github.com/mvrilo/go-particles/particles"
)
type Canvas struct {
	done chan struct{}
	fps          time.Duration
	width        int
	height       int
	background   string
	maxparticles int
	config       particles.Config
	window js.Value
	doc    js.Value
	body   js.Value
	canvas js.Value
	ctx    js.Value
	reqID  js.Value
	group *particles.Group
}
func NewCanvas(id string, fps time.Duration, background string, maxparticles int, particleConfig particles.Config) *Canvas {
	win := js.Global()
	doc := win.Get("document")
	body := doc.Get("body")
	canvas := doc.Call("createElement", "canvas")
	ctx := canvas.Call("getContext", "2d")
	canvas.Set("id", id)
	return &Canvas{
		fps:          fps,
		maxparticles: maxparticles,
		body:         body,
		canvas:       canvas,
		config:       particleConfig,
		ctx:          ctx,
		doc:          doc,
		window:       win,
		background:   background,
		done:         make(chan struct{}),
	}
}
func (c *Canvas) Start() {
	c.group = particles.NewGroup(c.width, c.height, c.maxparticles, c.config)
}