diff --git a/orx-temporal-blur/src/demo/kotlin/DemoBasic01.kt b/orx-temporal-blur/src/demo/kotlin/DemoBasic01.kt index cfd1f70c..0cb67843 100644 --- a/orx-temporal-blur/src/demo/kotlin/DemoBasic01.kt +++ b/orx-temporal-blur/src/demo/kotlin/DemoBasic01.kt @@ -5,16 +5,10 @@ import org.openrndr.math.Polar fun main() = application { program { - if (System.getProperty("takeScreenshot") == "true") { - extend(SingleScreenshot()) { - this.outputFile = System.getProperty("screenshotPath") - } - } extend(TemporalBlur()) { samples = 10 duration = 0.9 } - extend { drawer.circle(Polar(seconds * 360.0, 200.0).cartesian + drawer.bounds.center, 50.0) } diff --git a/orx-temporal-blur/src/demo/kotlin/DemoColorShift01.kt b/orx-temporal-blur/src/demo/kotlin/DemoColorShift01.kt index a6460836..41219fd6 100644 --- a/orx-temporal-blur/src/demo/kotlin/DemoColorShift01.kt +++ b/orx-temporal-blur/src/demo/kotlin/DemoColorShift01.kt @@ -1,18 +1,12 @@ import org.openrndr.application import org.openrndr.color.ColorRGBa import org.openrndr.draw.tint -import org.openrndr.extensions.SingleScreenshot import org.openrndr.extra.temporalblur.TemporalBlur import org.openrndr.math.Polar import kotlin.math.cos fun main() = application { program { - if (System.getProperty("takeScreenshot") == "true") { - extend(SingleScreenshot()) { - this.outputFile = System.getProperty("screenshotPath") - } - } extend(TemporalBlur()) { samples = 100 duration = 10.0 diff --git a/orx-temporal-blur/src/main/kotlin/TemporalBlur.kt b/orx-temporal-blur/src/main/kotlin/TemporalBlur.kt index 4f7478e6..f2beac82 100644 --- a/orx-temporal-blur/src/main/kotlin/TemporalBlur.kt +++ b/orx-temporal-blur/src/main/kotlin/TemporalBlur.kt @@ -3,6 +3,7 @@ package org.openrndr.extra.temporalblur import org.intellij.lang.annotations.Language import org.openrndr.Extension import org.openrndr.Program +import org.openrndr.ProgramImplementation import org.openrndr.color.ColorRGBa import org.openrndr.draw.* import org.openrndr.extra.noise.uniformRing @@ -179,7 +180,7 @@ class TemporalBlur : Extension { program.clock = { oldClockValue - (i * duration) / (fps * samples) } // I guess we need something better here. - val fsf = Program::class.java.getDeclaredField("frameSeconds") + val fsf = ProgramImplementation::class.java.getDeclaredField("frameSeconds") fsf.isAccessible = true fsf.setDouble(program, program.clock()) @@ -229,7 +230,7 @@ class TemporalBlur : Extension { // restore clock program.clock = oldClock - val fsf = Program::class.java.getDeclaredField("frameSeconds") + val fsf = ProgramImplementation::class.java.getDeclaredField("frameSeconds") fsf.isAccessible = true fsf.setDouble(program, oldClockTime) }