[WIP] fix falling leaf color

This commit is contained in:
octarine-noise
2021-05-11 16:53:08 +02:00
parent a917d5b3db
commit dbc421c18e
4 changed files with 3 additions and 57 deletions

View File

@@ -66,7 +66,7 @@ val TextureAtlasSprite.averageColor: HSB
for (y in 0 until height) {
val pixel = getPixelRGBA(0, x, y)
val alpha = (pixel shr 24) and 255
val hsb = HSB.fromColor(pixel)
val hsb = HSB.fromColorRGBA(pixel)
if (alpha == 255) {
numOpaque++
sumHueX += cos((hsb.hue.toDouble() - 0.5) * PI2)