Files
orx/orx-property-watchers/src/jvmDemo/kotlin/DemoPropertyWatchers01.kt
Abe Pazos c8f7dd52c6 Demos: ensure all use fun main() = application {
- Adjust some demo window sizes.
- Replace Random.double by Double.uniform
- Tweak some demos so screenshots look more interesting
2025-01-26 20:57:04 +01:00

21 lines
406 B
Kotlin

import org.openrndr.application
import org.openrndr.extra.propertywatchers.watchingProperty
fun main() = application {
program {
val state = object {
val x by watchingProperty(mouse::position) {
it.x
}
val xx by watchingProperty(::x) {
it * it
}
}
extend {
state.x
}
}
}