Files
orx/orx-jvm/orx-keyframer/src/demo/kotlin/DemoSimple01.kt
2024-09-02 12:15:44 +02:00

19 lines
558 B
Kotlin

import org.openrndr.application
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extra.keyframer.Keyframer
import org.openrndr.resourceUrl
import java.net.URL
fun main() = application {
program {
class Animation: Keyframer() {
val position by Vector2Channel(arrayOf("x", "y"))
}
val animation = Animation()
animation.loadFromJson(URL(resourceUrl("/demo-simple-01.json")))
extend {
animation(seconds)
drawer.circle(animation.position, 100.0)
}
}
}