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,10 +1,10 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.colorBuffer
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extra.noise.gradientPerturbFractal
import org.openrndr.extra.noise.simplex
import org.openrndr.math.Vector2
import org.openrndr.math.Vector3
import kotlin.math.absoluteValue
fun main() {
@@ -12,6 +12,11 @@ fun main() {
program {
val cb = colorBuffer(width, height)
val shad = cb.shadow
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
for (y in 0 until height) {
for (x in 0 until width) {