Remove unnecessary uses of "takeScreenshot" (#349)
This commit is contained in:
@@ -33,19 +33,6 @@ fun main() = application {
|
||||
Note that drawing inside the `repeat` action has no effect. Have a look at the demos listed below for an example of
|
||||
`repeat` triggered drawing.
|
||||
|
||||
## Demos
|
||||
|
||||
* [Simple `repeat` demonstration](src/demo/kotlin/DemoRepeat01.kt)
|
||||
* [A `repeat` demonstration with drawing](src/demo/kotlin/DemoRepeat02.kt)
|
||||
* [Simple `timeOut` demonstration](src/demo/kotlin/DemoTimeOut01.kt)
|
||||
<!-- __demos__ >
|
||||
# Demos
|
||||
[DemoRepeat01Kt](src/demo/kotlin/DemoRepeat01Kt.kt
|
||||
 = application {
|
||||
program {
|
||||
repeat(2.0) {
|
||||
println("hello there $seconds" )
|
||||
}
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend {
|
||||
|
||||
println("hello there $seconds")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.events.Event
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.timer.repeat
|
||||
|
||||
/**
|
||||
@@ -19,11 +18,6 @@ fun main() = application {
|
||||
// -- we can not draw here, so we relay the repeat signal to the event
|
||||
event.trigger(null)
|
||||
}
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.PINK)
|
||||
// -- by explicitly calling deliver we know that the drawing code in the listener will be
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.timer.timeOut
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
timeOut(2.0) {
|
||||
println("hello there $seconds" )
|
||||
println("hello there $seconds")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user