[orx-chataigne] Remove verbosity, change layout, exclude demo from actions
This commit is contained in:
@@ -179,6 +179,8 @@ task collectScreenshots {
|
|||||||
continue
|
continue
|
||||||
if (sub.name == "orx-runway")
|
if (sub.name == "orx-runway")
|
||||||
continue
|
continue
|
||||||
|
if (sub.name == "orx-chataigne")
|
||||||
|
continue
|
||||||
def set = sub.sourceSets.demo
|
def set = sub.sourceSets.demo
|
||||||
def ucl = new URLClassLoader(set.runtimeClasspath.collect { it.toURI().toURL() } as URL[])
|
def ucl = new URLClassLoader(set.runtimeClasspath.collect { it.toURI().toURL() } as URL[])
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
import mu.KotlinLogging
|
||||||
import org.openrndr.color.ColorRGBa
|
import org.openrndr.color.ColorRGBa
|
||||||
import org.openrndr.extra.osc.OSC
|
import org.openrndr.extra.osc.OSC
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
|
private val logger = KotlinLogging.logger {}
|
||||||
|
|
||||||
open class ChataigneOSC(
|
open class ChataigneOSC(
|
||||||
val osc: OSC
|
val osc: OSC
|
||||||
) {
|
) {
|
||||||
@@ -19,16 +22,12 @@ open class ChataigneOSC(
|
|||||||
return currentDouble
|
return currentDouble
|
||||||
}
|
}
|
||||||
|
|
||||||
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Double) {
|
|
||||||
print("$value")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ColorChannel(key: String) {
|
inner class ColorChannel(key: String) {
|
||||||
private var currentColor = ColorRGBa.BLACK
|
private var currentColor = ColorRGBa.BLACK
|
||||||
|
|
||||||
init {
|
init {
|
||||||
println(key)
|
|
||||||
osc.listen(key) {
|
osc.listen(key) {
|
||||||
val c = it[0] as Color
|
val c = it[0] as Color
|
||||||
currentColor = ColorRGBa(c.red / 255.0, c.green / 255.0, c.blue / 255.0, c.alpha / 255.0)
|
currentColor = ColorRGBa(c.red / 255.0, c.green / 255.0, c.blue / 255.0, c.alpha / 255.0)
|
||||||
@@ -38,9 +37,7 @@ open class ChataigneOSC(
|
|||||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): ColorRGBa {
|
operator fun getValue(thisRef: Any?, property: KProperty<*>): ColorRGBa {
|
||||||
return currentColor
|
return currentColor
|
||||||
}
|
}
|
||||||
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Double) {
|
|
||||||
print("$value")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun update(seconds: Double) {
|
fun update(seconds: Double) {
|
||||||
@@ -48,6 +45,8 @@ open class ChataigneOSC(
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
println("setup Chataigne with OSC ${osc.address} in:${osc.portIn} out:${osc.portOut}")
|
logger.info {
|
||||||
|
"setup Chataigne with OSC ${osc.address} in:${osc.portIn} out:${osc.portOut}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user