Add ApplicationPreload mechanism to collectScreenshots

This commit is contained in:
Edwin Jakobs
2021-08-31 22:43:39 +02:00
parent 46dfc06ab1
commit bf11867232
62 changed files with 94 additions and 379 deletions

View File

@@ -1,9 +1,8 @@
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
import ScreenshotsHelper.collectScreenshots
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("orx.collect-screenshots")
}
val kotlinxSerializationVersion: String by rootProject.extra

View File

@@ -16,13 +16,6 @@ fun main() {
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val mesh = sphereMesh(8, 8, radius = 0.1)
val instanceData = vertexBuffer(
@@ -32,8 +25,7 @@ fun main() {
},
90 * 100
)
println(extensions.size)
extend(Orbital())
extend {

View File

@@ -15,12 +15,6 @@ fun main() {
height = 800
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val mesh = sphereMesh(8, 8, radius = 0.1)
val instanceData = vertexBuffer(

View File

@@ -12,12 +12,6 @@ import org.openrndr.shape.Rectangle
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val numColors = 10
val colorLists = listOf(
ColorRGBa.PINK..ColorRGBa.BLUE.toHSVa() blend numColors,

View File

@@ -11,12 +11,6 @@ import org.openrndr.extras.color.spaces.toHSLUVa
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
val cs = colorSequence(0.0 to ColorRGBa.PINK,
0.5 to ColorRGBa.BLUE,

View File

@@ -11,12 +11,6 @@ import org.openrndr.extras.color.spaces.toXSLUVa
fun main() {
application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.clear(ColorRGBa.WHITE)

View File

@@ -21,13 +21,6 @@ fun main() {
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val mesh = sphereMesh(8, 8, radius = 0.1)
extend(Orbital())

View File

@@ -14,12 +14,6 @@ import org.openrndr.shape.Rectangle
fun main() {
application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val font = loadFont("demo-data/fonts/IBMPlexMono-Regular.ttf", 26.0)
extend {
drawer.stroke = null

View File

@@ -23,13 +23,6 @@ fun main() {
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.clear(ColorRGBa.GRAY)
val color = ColorRGBa.RED

View File

@@ -7,12 +7,6 @@ import org.openrndr.extras.color.statistics.calculateHistogramRGB
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val useColors = 32
val image = loadImage("demo-data/images/image-001.png")

View File

@@ -8,12 +8,6 @@ import kotlin.math.pow
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val image = loadImage("demo-data/images/image-001.png")
// -- here we use non-uniform weighting, such that bright colors are prioritized
val histogram = calculateHistogramRGB(image, weighting = {

View File

@@ -7,12 +7,6 @@ import org.openrndr.extras.color.statistics.calculateHistogramRGB
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val image = loadImage("demo-data/images/image-001.png")
val histogram = calculateHistogramRGB(image)
extend {

View File

@@ -39,13 +39,6 @@ fun main() {
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val arcs = (0..4).map { Arc(it * 90.0 - 45.0, 50.0, 90.0, 50.0) }.split(5)
extend {