Add screenshot generation
This commit is contained in:
@@ -14,6 +14,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,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) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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.Vector3
|
||||
@@ -11,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) {
|
||||
|
||||
Reference in New Issue
Block a user