minorly simplify typewriter example

This commit is contained in:
faiface 2017-05-28 00:06:29 +02:00
parent ba761383ac
commit 3e4b1b8ebd
1 changed files with 1 additions and 4 deletions

View File

@ -227,10 +227,7 @@ func (dl *dotlight) Draw(t pixel.Target, m pixel.Matrix) {
dl.imd.Color = pixel.Alpha(0) dl.imd.Color = pixel.Alpha(0)
for i := 0.0; i <= 32; i++ { for i := 0.0; i <= 32; i++ {
angle := i * 2 * math.Pi / 32 angle := i * 2 * math.Pi / 32
dl.imd.Push(dl.pos.Add(pixel.V( dl.imd.Push(dl.pos.Add(pixel.V(dl.radius, 0).Rotated(angle)))
math.Cos(angle)*dl.radius,
math.Sin(angle)*dl.radius,
)))
} }
dl.imd.Polygon(0) dl.imd.Polygon(0)
dl.imd.Draw(t) dl.imd.Draw(t)