Add ApplicationPreload mechanism to collectScreenshots
This commit is contained in:
@@ -190,6 +190,11 @@ val v8 = billow(seed, x, y, z, ::perlinLinear, octaves, lacunarity, gain)
|
||||

|
||||
|
||||

|
||||
|
||||
### DemoGradientPerturb2D
|
||||
[source code](src/demo/kotlin/DemoGradientPerturb2D.kt)
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
sourceSets {
|
||||
demo {
|
||||
java {
|
||||
srcDirs = ["src/demo/kotlin"]
|
||||
compileClasspath += main.getCompileClasspath()
|
||||
runtimeClasspath += main.getRuntimeClasspath()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":orx-shader-phrases")
|
||||
implementation project(":orx-parameters")
|
||||
|
||||
demoImplementation(project(":orx-camera"))
|
||||
demoImplementation("org.openrndr:openrndr-application:$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,3 +1,5 @@
|
||||
import ScreenshotsHelper.collectScreenshots
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
kotlin("plugin.serialization")
|
||||
@@ -28,6 +30,7 @@ kotlin {
|
||||
implementation(compilations["main"]!!.output.allOutputs)
|
||||
}
|
||||
}
|
||||
collectScreenshots { }
|
||||
}
|
||||
}
|
||||
compilations.all {
|
||||
|
||||
@@ -11,22 +11,12 @@ import org.openrndr.extra.noise.withVector2Output
|
||||
import org.openrndr.extra.noise.gradient
|
||||
import org.openrndr.shape.contour
|
||||
|
||||
typealias IDDD_D = ((Int, Double, Double, Double) -> Double)
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
height = 720
|
||||
}
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
|
||||
val c = simplex3D.perturb({v->v})::class
|
||||
println(c)
|
||||
println(IDDD_D::perturb)
|
||||
val n = simplex3D.withVector2Output().gradient()
|
||||
extend {
|
||||
drawer.stroke = null
|
||||
|
||||
@@ -7,17 +7,11 @@ import org.openrndr.extra.noise.simplex
|
||||
import org.openrndr.math.Vector2
|
||||
import kotlin.math.absoluteValue
|
||||
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
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) {
|
||||
|
||||
@@ -12,11 +12,6 @@ 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,5 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.noise.poissonDiskSampling
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Circle
|
||||
@@ -8,14 +7,7 @@ import org.openrndr.shape.Circle
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
|
||||
var points = poissonDiskSampling(200.0, 200.0, 5.0, 10)
|
||||
|
||||
val rectPoints = points.map { Circle(Vector2(100.0, 100.0) + it, 3.0) }
|
||||
|
||||
points = poissonDiskSampling(200.0, 200.0, 5.0, 10, true) { w: Double, h: Double, v: Vector2 ->
|
||||
@@ -26,7 +18,6 @@ fun main() {
|
||||
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.BLACK)
|
||||
|
||||
drawer.stroke = null
|
||||
drawer.fill = ColorRGBa.PINK
|
||||
drawer.circles(rectPoints)
|
||||
|
||||
@@ -11,11 +11,6 @@ fun main() = application {
|
||||
height = 720
|
||||
}
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend {
|
||||
drawer.stroke = null
|
||||
drawer.fill = ColorRGBa.PINK
|
||||
|
||||
Reference in New Issue
Block a user