Skip to content

Instantly share code, notes, and snippets.

@wrightwriter
Last active April 28, 2023 18:37
Show Gist options
  • Save wrightwriter/98a7c5cdeaccd28bb599f3561de3a52d to your computer and use it in GitHub Desktop.
Save wrightwriter/98a7c5cdeaccd28bb599f3561de3a52d to your computer and use it in GitHub Desktop.
import com.krab.lazy.*;
import processing.core.PApplet
class Sketch : PApplet() {
companion object {
fun run() {
val art = Sketch()
art.runSketch()
}
}
lateinit var gui: LazyGui
override fun settings() {
size(800,800,P2D)
}
override fun setup() {
this.gui = LazyGui(this)
}
override fun draw() {
background(gui.colorPicker("bg").hex);
}
}
fun main(args: Array<String>) {
Sketch.run()
}
@wrightwriter
Copy link
Author

This thread has a discussion on Processing under Kotlin - https://discourse.processing.org/t/writing-processing-in-kotlin/3957/30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment