Skip to content

Instantly share code, notes, and snippets.

@as27
Created April 26, 2018 21:35
Show Gist options
  • Save as27/816b80d047ef631975be3b6789a4f039 to your computer and use it in GitHub Desktop.
Save as27/816b80d047ef631975be3b6789a4f039 to your computer and use it in GitHub Desktop.
A simple gop5js example
package main
import (
"github.com/as27/gop5js"
)
func main() {
gop5js.CanvasHeight = 400
gop5js.CanvasWidth = 400
gop5js.Draw = draw
gop5js.Serve()
}
func draw() {
gop5js.Background("127")
gop5js.Ellipse(20, 20, 30, 30)
gop5js.Rect(100, 100, 20, 20)
gop5js.Text("some text here", 20, 200)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment