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,10 +1,8 @@
import Orx_collect_screenshots_gradle.ScreenshotsHelper.collectScreenshots
import ScreenshotsHelper.collectScreenshots
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("orx.embed-shaders")
id("orx.collect-screenshots")
}
val kotlinxSerializationVersion: String by rootProject.extra

View File

@@ -17,12 +17,6 @@ fun main() {
height = 500
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
// Create gradients with initial colors
val gradients = listOf(
RadialGradient(ColorRGBa.PINK, ColorRGBa.WHITE),

View File

@@ -10,11 +10,6 @@ import kotlin.math.cos
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.shadeStyle = linearGradient(
ColorRGBa.RED.toOKLABa(),

View File

@@ -20,12 +20,6 @@ import kotlin.math.cos
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val numPoints = 8
val gradient = NPointGradient(Array(numPoints) {
ColorXSVa(it * 360.0 / numPoints, 1.0, 1.0).toRGBa()

View File

@@ -18,12 +18,6 @@ import kotlin.math.sin
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val numPoints = 8
val gradient = NPointLinearGradient(Array(numPoints) {
ColorXSVa(it * 360.0 / numPoints, 1.0, 1.0).toRGBa()

View File

@@ -15,12 +15,6 @@ import kotlin.random.Random
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gradient = NPointRadialGradient(arrayOf(
ColorRGBa.PINK.opacify(0.0),
ColorRGBa.PINK, ColorRGBa.WHITE, ColorRGBa.PINK,

View File

@@ -8,11 +8,6 @@ import kotlin.math.cos
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.shadeStyle = radialGradient(
ColorRGBa.PINK,