mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
examples/airship: Improve z values
This commit is contained in:
parent
2555e3f226
commit
5fc190013a
@ -198,9 +198,9 @@ func drawGroundImage(screen *ebiten.Image, ground *ebiten.Image) {
|
||||
gw, _ := ground.Size()
|
||||
pw, ph := perspectiveGroundImage.Size()
|
||||
for j := 0; j < ph; j++ {
|
||||
// z is in [1, -1]
|
||||
// z is in [2, -1]
|
||||
rate := float64(j) / float64(ph)
|
||||
z := (1-rate)*1 + rate*-1
|
||||
z := (1-rate)*2 + rate*-1
|
||||
if z <= 0 {
|
||||
break
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user