Add screenshot generation
This commit is contained in:
@@ -21,6 +21,7 @@ dependencies {
|
||||
implementation "com.google.zxing:core:3.4.0"
|
||||
implementation "com.google.zxing:javase:3.4.0"
|
||||
|
||||
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.loadFont
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.parameters.*
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.math.Vector3
|
||||
@@ -48,7 +49,11 @@ fun main() = application {
|
||||
}
|
||||
|
||||
rabbit.add(settings)
|
||||
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend(rabbit)
|
||||
extend {
|
||||
drawer.background(if (settings.b) ColorRGBa.BLUE else ColorRGBa.BLACK)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import org.openrndr.KEY_HOME
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.parameters.*
|
||||
|
||||
|
||||
@@ -19,6 +20,11 @@ fun main() = application {
|
||||
}
|
||||
|
||||
rabbit.add(settings)
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend(rabbit)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user