mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples/paint: Refactoring
This commit is contained in:
parent
cbc08d9c16
commit
62b364de2d
@ -42,7 +42,7 @@ func paint(screen *ebiten.Image, x, y int) {
|
|||||||
op := &ebiten.DrawImageOptions{}
|
op := &ebiten.DrawImageOptions{}
|
||||||
op.GeoM.Translate(float64(x), float64(y))
|
op.GeoM.Translate(float64(x), float64(y))
|
||||||
op.ColorM.Scale(1.0, 0.50, 0.125, 1.0)
|
op.ColorM.Scale(1.0, 0.50, 0.125, 1.0)
|
||||||
theta := 2.0 * math.Pi * float64(count%60) / ebiten.FPS
|
theta := 2.0 * math.Pi * float64(count%ebiten.FPS) / ebiten.FPS
|
||||||
op.ColorM.RotateHue(theta)
|
op.ColorM.RotateHue(theta)
|
||||||
canvasImage.DrawImage(brushImage, op)
|
canvasImage.DrawImage(brushImage, op)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user