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.draw.DrawPrimitive
import org.openrndr.draw.shadeStyle
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extras.camera.Orbital
import org.openrndr.extras.meshgenerators.*
import org.openrndr.math.Vector3
@@ -9,7 +10,15 @@ import org.openrndr.math.transforms.transform
fun main() {
application {
program {
extend(Orbital())
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend(Orbital()) {
this.eye = Vector3(0.0, 10.0, 20.0)
this.lookAt = Vector3(0.0, 5.0, 0.0)
}
val m = meshGenerator {
group {
hemisphere(32, 16, 5.0)