Skip to content

Commit 65cc33a

Browse files
committed
[orx-poisson-fill] Fix demos
1 parent 2545575 commit 65cc33a

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1+
import ScreenshotsHelper.collectScreenshots
2+
13
sourceSets {
2-
demo {
4+
val main by getting { }
5+
val demo by creating {
36
java {
4-
srcDirs = ["src/demo/kotlin"]
7+
srcDir("src/demo/kotlin")
58
compileClasspath += main.getCompileClasspath()
69
runtimeClasspath += main.getRuntimeClasspath()
710
}
811
}
12+
collectScreenshots(project, demo) { }
913
}
14+
15+
val openrndrVersion: String by rootProject.extra
16+
val openrndrOS: String by rootProject.extra
17+
18+
val demoImplementation by configurations.getting {}
19+
val demoRuntimeOnly by configurations.getting {}
20+
1021
dependencies {
11-
implementation project(":orx-fx")
12-
implementation project(":orx-noise")
22+
implementation(project(":orx-fx"))
23+
implementation(project(":orx-noise"))
1324
implementation("org.openrndr:openrndr-filter:$openrndrVersion")
1425
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
1526
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
1627
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
1728
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
1829
demoImplementation(sourceSets.getByName("main").output)
19-
}
30+
}

orx-jvm/orx-poisson-fill/src/demo/kotlin/DemoPoissonFill01.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@ import org.openrndr.poissonfill.PoissonFill
1616
import org.openrndr.shape.Rectangle
1717
import kotlin.math.sin
1818

19-
data class Thing(val color: ColorRGBa, var pos: Polar, val speed: Polar)
2019

2120
fun main() {
22-
application {
23-
program {
21+
data class Thing(val color: ColorRGBa, var pos: Polar, val speed: Polar)
2422

25-
// -- this block is for automation purposes only
26-
if (System.getProperty("takeScreenshot") == "true") {
27-
extend(SingleScreenshot()) {
28-
this.outputFile = System.getProperty("screenshotPath")
29-
}
30-
}
3123

24+
application {
25+
program {
3226
val dry = renderTarget(width, height) {
3327
colorBuffer(type = ColorType.FLOAT32)
3428
}

0 commit comments

Comments
 (0)