update code for 03 guide

This commit is contained in:
faiface 2017-04-03 17:38:12 +02:00
parent 8d5879070f
commit ad733f5946
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"image"
"os"
"time"
_ "image/png"
@ -46,8 +47,12 @@ func run() {
angle := 0.0
last := time.Now()
for !win.Closed() {
angle += 0.05
dt := time.Since(last).Seconds()
last = time.Now()
angle += 3 * dt
win.Clear(colornames.Firebrick)