[orx-noise] Tidy up demos

Produce 720px wide images.
Use main() = application { for reduced indentation
This commit is contained in:
Abe Pazos
2025-01-24 21:47:44 +01:00
parent a1b4070b51
commit c85144c6fe
23 changed files with 347 additions and 347 deletions

View File

@@ -6,23 +6,25 @@ import org.openrndr.shape.Ellipse
import kotlin.math.cos
import kotlin.random.Random
fun main() {
application {
program {
extend {
val shape = Ellipse(Vector2(width/2.0, height/2.0), 200.0, 150.0 + cos(seconds)*125.0).shape
val points = shape.scatter(20.0, random = Random(0))
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = null
drawer.fill = ColorRGBa.PINK
drawer.circles(points, 4.0)
fun main() = application {
configure {
width = 720
height = 540
}
program {
extend {
val shape = Ellipse(Vector2(width / 2.0, height / 2.0), 200.0, 150.0 + cos(seconds) * 125.0).shape
val points = shape.scatter(20.0, random = Random(0))
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = null
drawer.fill = ColorRGBa.PINK
drawer.circles(points, 4.0)
if (seconds.mod(2.0) < 1.0) {
drawer.stroke = ColorRGBa.PINK
drawer.fill = null
drawer.shape(shape)
}
if (seconds.mod(2.0) < 1.0) {
drawer.stroke = ColorRGBa.PINK
drawer.fill = null
drawer.shape(shape)
}
}
}
}
}