From fecebfd39809f862e098805219b15c50588bb81a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 30 Aug 2026 22:41:25 +0530 Subject: Development setup + toggling recording --- src/main/kotlin/play/PlayShowProgram.kt | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/main/kotlin/play/PlayShowProgram.kt (limited to 'src/main/kotlin/play') diff --git a/src/main/kotlin/play/PlayShowProgram.kt b/src/main/kotlin/play/PlayShowProgram.kt new file mode 100644 index 0000000..016378f --- /dev/null +++ b/src/main/kotlin/play/PlayShowProgram.kt @@ -0,0 +1,42 @@ +package play + +import kotlin.math.cos +import kotlin.math.sin +import org.openrndr.application +import org.openrndr.color.ColorRGBa +import org.openrndr.draw.loadFont +import org.openrndr.draw.loadImage +import org.openrndr.extra.color.colormatrix.tint +import org.openrndr.extra.olive.oliveProgram +import phenax.utils.* + +fun main() = application { + recordDuration(10) + + configure { + width = 640 + height = 480 + windowResizable = false + } + + oliveProgram { + val image = loadImage("data/images/pm5544.png") + val font = loadFont("data/fonts/default.otf", 64.0) + + extend { + drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2)) + drawer.image(image) + + drawer.fill = ColorRGBa.PINK + drawer.circle( + cos(seconds) * width / 2.0 + width / 2.0, + sin(0.5 * seconds) * height / 2.0 + height / 2.0, + 140.0 + ) + + drawer.fontMap = font + drawer.fill = ColorRGBa.WHITE + drawer.text("OPENRNDR", width / 2.0, height / 2.0) + } + } +} -- cgit v1.3.1