From e81c83dfe6a38734a4fc91c162688cad4900bf33 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 12 Mar 2018 03:23:29 +0900 Subject: [PATCH] docs: Update --- docs/examples/airship.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/examples/airship.html b/docs/examples/airship.html index a1d94e40c..90732a367 100644 --- a/docs/examples/airship.html +++ b/docs/examples/airship.html @@ -213,6 +213,9 @@ func drawGroundImage(screen *ebiten.Image, ground *ebiten.Image) { // z is in [1, -1] rate := float64(j) / float64(ph) z := (1-rate)*1 + rate*-1 + if z <= 0 { + break + } op := &ebiten.DrawImageOptions{} op.GeoM.Translate(-float64(pw)/2, 0) op.GeoM.Scale(1/z, 8) // 8 is an arbitrary number not to make empty lines.