Fix ColorChannel (#156)

This commit is contained in:
Dennis Scheiba
2021-01-22 09:09:03 +01:00
committed by GitHub
parent 0670e707bd
commit 199e9635fa

View File

@@ -29,8 +29,12 @@ open class ChataigneOSC(
init {
osc.listen(key) {
val c = it[0] as Color
currentColor = ColorRGBa(c.red / 255.0, c.green / 255.0, c.blue / 255.0, c.alpha / 255.0)
val red = it[0] as Float
val green = it[1] as Float
val blue = it[2] as Float
val alpha = it[3] as Float
currentColor = ColorRGBa(red.toDouble(), green.toDouble(), blue.toDouble(), alpha.toDouble())
}
}
@@ -49,4 +53,4 @@ open class ChataigneOSC(
"setup Chataigne with OSC ${osc.address} in:${osc.portIn} out:${osc.portOut}"
}
}
}
}