diff --git a/examples/typewriter/main.go b/examples/typewriter/main.go index 6b4bb952245b4b1b598381ab60237126698c474c..eb36cbd8b1d4a1a59e58c3b61f3c93a386b7eda4 100644 --- a/examples/typewriter/main.go +++ b/examples/typewriter/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "image/color" "math" "math/rand" @@ -120,7 +121,7 @@ func (tw *typewriter) Draw(t pixel.Target, m pixel.Matrix) { func typeRune(tw *typewriter, r rune) { tw.Ribbon(r) if !unicode.IsSpace(r) { - go shake(tw, 3, 30) + go shake(tw, 3, 17) } } @@ -149,6 +150,7 @@ func shake(tw *typewriter, intensity, friction float64) { intensity -= friction * dt tw.Offset(off) + fmt.Println(off) } }