Add screenshot generation
This commit is contained in:
@@ -13,6 +13,7 @@ dependencies {
|
||||
|
||||
demoImplementation(project(":orx-camera"))
|
||||
demoImplementation("org.openrndr:openrndr-core:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.isolated
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.timeoperators.Envelope
|
||||
import org.openrndr.extra.timeoperators.TimeOperators
|
||||
|
||||
@@ -10,6 +11,11 @@ fun main() {
|
||||
val size = Envelope(50.0, 400.0, 0.5, 0.5)
|
||||
val rotation = Envelope(easingFactor = 0.4)
|
||||
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend(TimeOperators()) {
|
||||
track(size, rotation)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.isolated
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.timeoperators.Envelope
|
||||
import org.openrndr.extra.timeoperators.LFO
|
||||
import org.openrndr.extra.timeoperators.LFOWave
|
||||
@@ -11,7 +12,11 @@ fun main() {
|
||||
program {
|
||||
val size = LFO()
|
||||
val rotation = LFO(LFOWave.SINE)
|
||||
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend(TimeOperators()) {
|
||||
track(size, rotation)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user