Created
April 26, 2018 21:35
-
-
Save as27/816b80d047ef631975be3b6789a4f039 to your computer and use it in GitHub Desktop.
A simple gop5js example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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