examples/subimage: add a comment

Updates #2471
This commit is contained in:
Hajime Hoshi 2023-02-17 02:06:37 +09:00
parent 7018d1aebe
commit c568668149

View File

@ -58,6 +58,8 @@ func (g *Game) Draw(screen *ebiten.Image) {
g.subImages[i][j] = img
}
// Rendering onto a sub image should be efficient,
// but this is not efficient some environments like browsers (#2471).
clr := color.RGBA{byte(0xff * float64(i) / cx), byte(0xff * float64(j) / cx), 0, 0xff}
img.Fill(clr)
}