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
This commit is contained in:
Abe Pazos
2025-01-26 20:57:04 +01:00
parent 1975a820fc
commit c8f7dd52c6
116 changed files with 2889 additions and 2942 deletions

View File

@@ -4,25 +4,23 @@ import org.openrndr.extra.parameters.Description
import org.openrndr.extra.parameters.PathParameter
import org.openrndr.extra.propertywatchers.watchingImagePath
fun main() {
application {
program {
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
fun main() = application {
program {
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
val settings = @Description("Settings") object {
@PathParameter("image", extensions = ["jpg", "png"], order = 10)
var imagePath = "demo-data/images/image-001.png"
val settings = @Description("Settings") object {
@PathParameter("image", extensions = ["jpg", "png"], order = 10)
var imagePath = "demo-data/images/image-001.png"
val image by watchingImagePath(::imagePath) {
it
}
}
gui.add(settings)
extend(gui)
extend {
drawer.image(settings.image)
val image by watchingImagePath(::imagePath) {
it
}
}
gui.add(settings)
extend(gui)
extend {
drawer.image(settings.image)
}
}
}
}