Add screenshot generation

This commit is contained in:
Edwin Jakobs
2020-04-22 21:56:08 +02:00
parent 6a29853c71
commit 60a64806fc
66 changed files with 1316 additions and 84 deletions

View File

@@ -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)
}

View File

@@ -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)
}