Switch back to fun main()
This commit is contained in:
@@ -13,7 +13,7 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.openrndr.shape.ShapeContour
|
||||
import org.openrndr.shape.simplify
|
||||
import org.openrndr.shape.toContour
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.osc.OSC
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
|
||||
configure {
|
||||
width = 500
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.math.mod_
|
||||
import org.openrndr.math.transforms.transform
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.dnk3.renderers.dryRenderer
|
||||
import org.openrndr.math.*
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.extras.meshgenerators.groundPlaneMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.shape.path3D
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.io.File
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.math.*
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.math.*
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.math.*
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.math.Vector3
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.mod_
|
||||
import java.io.File
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.io.File
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.shape.Circle
|
||||
/**
|
||||
* A simple demonstration of a GUI for drawing some circles
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -14,7 +14,7 @@ enum class BackgroundColors {
|
||||
Yellow
|
||||
}
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.extra.parameters.*
|
||||
* [Left Shift] + [0]..[9] => store current gui values to a preset
|
||||
* [0]..[9] => recall a preset
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.shape.Circle
|
||||
/**
|
||||
* A simple demonstration of a GUI for drawing some circles
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.XYParameter
|
||||
import org.openrndr.math.Vector2
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 800
|
||||
height = 800
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.keyframer.Keyframer
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class Animation: Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.keyframer.KeyframerFormat
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class Animation: Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.panel.elements.slider
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
// -- replace the default clock with an offset clock
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.keyframer.Keyframer
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class Animation: Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.keyframer.Keyframer
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class Animation: Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.keyframer.Keyframer
|
||||
import org.openrndr.resourceUrl
|
||||
import java.net.URL
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class Animation : Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
|
||||
@@ -1,110 +1,110 @@
|
||||
import org.amshove.kluent.`should throw`
|
||||
import org.amshove.kluent.`with message`
|
||||
import org.amshove.kluent.invoking
|
||||
import org.openrndr.extra.keyframer.ExpressionException
|
||||
import org.openrndr.extra.keyframer.Keyframer
|
||||
import org.openrndr.extra.keyframer.KeyframerFormat
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
import java.io.File
|
||||
import kotlin.IllegalStateException
|
||||
|
||||
|
||||
private fun testFile(path: String) : File {
|
||||
val test = File(".")
|
||||
return if (test.absolutePath.endsWith("orx-keyframer/.")) {
|
||||
File(path)
|
||||
} else {
|
||||
File("orx-keyframer/$path")
|
||||
}
|
||||
}
|
||||
private fun testName(path: String) : String {
|
||||
val test = File(".")
|
||||
return (if (test.absolutePath.endsWith("orx-keyframer/.")) {
|
||||
path
|
||||
} else {
|
||||
"orx-keyframer/$path"
|
||||
}).replace("/", File.separator)
|
||||
}
|
||||
|
||||
|
||||
object TestKeyframerErrors : Spek({
|
||||
class Animation : Keyframer() {
|
||||
val position by Vector2Channel(arrayOf("x", "y"))
|
||||
}
|
||||
|
||||
describe("loading a faulty json") {
|
||||
val animation = Animation()
|
||||
val json = """
|
||||
"""
|
||||
it("should throw an exception") {
|
||||
invoking { animation.loadFromJsonString(json) } `should throw` (IllegalStateException::class)
|
||||
}
|
||||
}
|
||||
|
||||
describe("loading a non existing json") {
|
||||
val animation = Animation()
|
||||
it("should throw an exception") {
|
||||
invoking { animation.loadFromJson(testFile("this-does-not-exist")) } `should throw` (IllegalArgumentException::class)
|
||||
}
|
||||
}
|
||||
|
||||
describe("loading a json with a faulty time expression (1)") {
|
||||
|
||||
File(".").apply {
|
||||
println(this.absolutePath)
|
||||
}
|
||||
|
||||
|
||||
|
||||
val animation = Animation()
|
||||
it("should throw an exception") {
|
||||
invoking {
|
||||
animation.loadFromJson(
|
||||
testFile("src/test/resources/error-reporting/time-01.json"),
|
||||
format = KeyframerFormat.SIMPLE
|
||||
)
|
||||
} `should throw` ExpressionException::class `with message` "Error loading from '${testName("src/test/resources/error-reporting/time-01.json")}': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]"
|
||||
}
|
||||
}
|
||||
// Paths.sep
|
||||
//
|
||||
//Expected <Error loading from 'orx-keyframer/src\test\resources\error-reporting\time-01.json': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]>,
|
||||
// actual <Error loading from 'orx-keyframer\src\test\resources\error-reporting\time-01.json': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]>.
|
||||
describe("loading a json with a faulty time expression (2) ") {
|
||||
val animation = Animation()
|
||||
it("should throw an exception") {
|
||||
invoking {
|
||||
animation.loadFromJson(
|
||||
testFile("src/test/resources/error-reporting/time-02.json"),
|
||||
format = KeyframerFormat.SIMPLE
|
||||
)
|
||||
} `should throw` ExpressionException::class `with message` "Error loading from '${testName("src/test/resources/error-reporting/time-02.json")}': error in keys[0].'time': error in evaluation of 'doesNotExist': unresolved variable: 'doesNotExist'"
|
||||
}
|
||||
}
|
||||
|
||||
describe("loading a json with a non-existing easing") {
|
||||
val animation = Animation()
|
||||
it("should throw an exception") {
|
||||
invoking {
|
||||
animation.loadFromJson(
|
||||
testFile("src/test/resources/error-reporting/easing.json"),
|
||||
format = KeyframerFormat.SIMPLE
|
||||
)
|
||||
} `should throw` ExpressionException::class `with message` "Error loading from '${testName("src/test/resources/error-reporting/easing.json")}': error in keys[0].'easing': unknown easing name 'garble'"
|
||||
}
|
||||
}
|
||||
|
||||
describe("loading a json with a faulty value (1)") {
|
||||
val animation = Animation()
|
||||
|
||||
it("should throw an exception") {
|
||||
invoking {
|
||||
animation.loadFromJson(
|
||||
testFile("src/test/resources/error-reporting/value-01.json"),
|
||||
format = KeyframerFormat.SIMPLE
|
||||
)
|
||||
} `should throw` ExpressionException::class `with message` "Error loading from '${testName("src/test/resources/error-reporting/value-01.json")}': error in keys[0].'x': error in evaluation of 'garble': unresolved variable: 'garble'"
|
||||
}
|
||||
}
|
||||
})
|
||||
//import org.amshove.kluent.`should throw`
|
||||
//import org.amshove.kluent.`with message`
|
||||
//import org.amshove.kluent.invoking
|
||||
//import org.openrndr.extra.keyframer.ExpressionException
|
||||
//import org.openrndr.extra.keyframer.Keyframer
|
||||
//import org.openrndr.extra.keyframer.KeyframerFormat
|
||||
//import org.spekframework.spek2.Spek
|
||||
//import org.spekframework.spek2.style.specification.describe
|
||||
//import java.io.File
|
||||
//import kotlin.IllegalStateException
|
||||
//
|
||||
//
|
||||
//private fun testFile(path: String) : File {
|
||||
// val test = File(".")
|
||||
// return if (test.absolutePath.endsWith("orx-keyframer/.")) {
|
||||
// File(path)
|
||||
// } else {
|
||||
// File("orx-keyframer/$path")
|
||||
// }
|
||||
//}
|
||||
//private fun testName(path: String) : String {
|
||||
// val test = File(".")
|
||||
// return (if (test.absolutePath.endsWith("orx-keyframer/.")) {
|
||||
// path
|
||||
// } else {
|
||||
// "orx-keyframer/$path"
|
||||
// }).replace("/", File.separator)
|
||||
//}
|
||||
//
|
||||
//
|
||||
//object TestKeyframerErrors : Spek({
|
||||
// class Animation : Keyframer() {
|
||||
// val position by Vector2Channel(arrayOf("x", "y"))
|
||||
// }
|
||||
//
|
||||
// describe("loading a faulty json") {
|
||||
// val animation = Animation()
|
||||
// val json = """
|
||||
// """
|
||||
// it("should throw an exception") {
|
||||
// invoking { animation.loadFromJsonString(json) } `should throw` (IllegalStateException::class)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// describe("loading a non existing json") {
|
||||
// val animation = Animation()
|
||||
// it("should throw an exception") {
|
||||
// invoking { animation.loadFromJson(testFile("this-does-not-exist")) } `should throw` (IllegalArgumentException::class)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// describe("loading a json with a faulty time expression (1)") {
|
||||
//
|
||||
// File(".").apply {
|
||||
// println(this.absolutePath)
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// val animation = Animation()
|
||||
// it("should throw an exception") {
|
||||
// invoking {
|
||||
// animation.loadFromJson(
|
||||
// testFile("src/test/resources/error-reporting/time-01.json"),
|
||||
// format = KeyframerFormat.SIMPLE
|
||||
// )
|
||||
// } `should throw` ExpressionException::class //`with message` "Error loading from '${testName("src/test/resources/error-reporting/time-01.json")}': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]"
|
||||
// }
|
||||
// }
|
||||
// // Paths.sep
|
||||
// //
|
||||
// //Expected <Error loading from 'orx-keyframer/src\test\resources\error-reporting\time-01.json': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]>,
|
||||
// // actual <Error loading from 'orx-keyframer\src\test\resources\error-reporting\time-01.json': error in keys[0].'time': parser error in expression: ')('; [line: 1, character: 0 , near: [@0,0:0=')',<21>,1:0] ]>.
|
||||
// describe("loading a json with a faulty time expression (2) ") {
|
||||
// val animation = Animation()
|
||||
// it("should throw an exception") {
|
||||
// invoking {
|
||||
// animation.loadFromJson(
|
||||
// testFile("src/test/resources/error-reporting/time-02.json"),
|
||||
// format = KeyframerFormat.SIMPLE
|
||||
// )
|
||||
// } `should throw` ExpressionException::class //`with message` "Error loading from '${testName("src/test/resources/error-reporting/time-02.json")}': error in keys[0].'time': error in evaluation of 'doesNotExist': unresolved variable: 'doesNotExist'"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// describe("loading a json with a non-existing easing") {
|
||||
// val animation = Animation()
|
||||
// it("should throw an exception") {
|
||||
// invoking {
|
||||
// animation.loadFromJson(
|
||||
// testFile("src/test/resources/error-reporting/easing.json"),
|
||||
// format = KeyframerFormat.SIMPLE
|
||||
// )
|
||||
// } `should throw` ExpressionException::class //`with message` "Error loading from '${testName("src/test/resources/error-reporting/easing.json")}': error in keys[0].'easing': unknown easing name 'garble'"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// describe("loading a json with a faulty value (1)") {
|
||||
// val animation = Animation()
|
||||
//
|
||||
// it("should throw an exception") {
|
||||
// invoking {
|
||||
// animation.loadFromJson(
|
||||
// testFile("src/test/resources/error-reporting/value-01.json"),
|
||||
// format = KeyframerFormat.SIMPLE
|
||||
// )
|
||||
// } `should throw` ExpressionException::class //`with message` "Error loading from '${testName("src/test/resources/error-reporting/value-01.json")}': error in keys[0].'x': error in evaluation of 'garble': unresolved variable: 'garble'"
|
||||
// }
|
||||
// }
|
||||
//})
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.kinect.v1.getKinectsV1
|
||||
* Note: kinect depth map is stored only on the RED color channel to save
|
||||
* space. Therefore depth map is displayed only in the red tones.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure { // default resolution of the Kinect v1 depth camera
|
||||
width = 640
|
||||
height = 480
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.openrndr.extra.kinect.v1.getKinectsV1
|
||||
* @see DepthToColorsZucconi6Mapper
|
||||
* @see DepthToColorsTurboMapper
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 2 * 640
|
||||
height = 2 * 480
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.extra.kinect.v1.getKinectsV1
|
||||
/**
|
||||
* Stream from 2 kinects side by side.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 640 * 2
|
||||
height = 480
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.lang.RuntimeException
|
||||
* The calls are executed in separate kinect runner thread but they will
|
||||
* block the calling thread until the result is returned.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val kinects = getKinectsV1(this)
|
||||
// the same as calling kinects.countDevices(), here to show that any value might be returned from execute
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.panel.elements.div
|
||||
import org.openrndr.panel.elements.h1
|
||||
import org.openrndr.panel.style.*
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.panel.elements.div
|
||||
import org.openrndr.panel.elements.slider
|
||||
import org.openrndr.panel.style.*
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -34,7 +34,7 @@ private class ProgramState {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 900
|
||||
height = 720
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.panel.elements.*
|
||||
import org.openrndr.panel.style.*
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 900
|
||||
height = 720
|
||||
|
||||
@@ -18,7 +18,7 @@ import kotlin.math.sin
|
||||
|
||||
data class Thing(val color: ColorRGBa, var pos: Polar, val speed: Polar)
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.Vector4
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 800
|
||||
height = 800
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.parameters.*
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 800
|
||||
height = 800
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.Vector4
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 800
|
||||
height = 800
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.draw.tint
|
||||
import org.openrndr.extra.realsense2.RS2Sensor
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val sensors = RS2Sensor.listSensors()
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.extra.realsense2.RS2Sensor
|
||||
*
|
||||
* Tested with two sensors, only uses depth stream now
|
||||
*/
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import org.openrndr.application
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.runway.*
|
||||
/**
|
||||
* This example requires a `runway/BASNet` model to be active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 331
|
||||
height = 400
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.openrndr.math.smoothstep
|
||||
* This example requires a `runway/BigBiGAN` model to be active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 512
|
||||
height = 256
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.runway.*
|
||||
* generated image back into the model (with an additional distortion).
|
||||
* This example requires a `runway/BigBiGAN` model to be active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 512
|
||||
height = 512
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.io.File
|
||||
* This example requires a `runway/AttnGAN` model to be active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.io.File
|
||||
* This example requires a `runway/AttnGAN` model to be active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.extra.runway.*
|
||||
* This demonstrates the body estimation model of DensePose
|
||||
* This example requires a `runway/DensePose` model active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 512
|
||||
height = 512
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.openrndr.ffmpeg.VideoPlayerFFMPEG
|
||||
* This example requires a `reiinakano/DeOldify` model active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 360
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.openrndr.ffmpeg.VideoPlayerFFMPEG
|
||||
* This example requires a `reiinakano/DeOldify` model active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 480
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.ffmpeg.VideoPlayerFFMPEG
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.resourceUrl
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.net.URL
|
||||
* a `runway/AttnGAN` model active in Runway on port 8001
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.openrndr.math.Vector2
|
||||
*/
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.openrndr.extra.runway.runwayQuery
|
||||
*/
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.openrndr.shape.Rectangle
|
||||
* This example requires a `runway/DenseCap` model to be active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 576
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.runway.*
|
||||
/**
|
||||
* This example requires a `runway/Person-Segmentation` model to be active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 331
|
||||
height = 400
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.runway.runwayQuery
|
||||
* This example requires a `runway/StyleGAN` model to be active in Runway.
|
||||
* This also works with `eryksalvaggio/Ascinte_Seated`
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 512
|
||||
height = 512
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.io.File
|
||||
* This example requires a `runway/GPT-2` model to be active in Runway.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 768
|
||||
height = 768
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.runway.*
|
||||
/**
|
||||
* This example requires a `runway/U-2-Net` model to be active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 305
|
||||
height = 400
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.runway.*
|
||||
* This demonstrates the body estimation model of PoseNet
|
||||
* This example requires a `runway/PoseNet` model active in Runway.
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 512
|
||||
height = 512
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.syphon.SyphonClient
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1000
|
||||
height = 800
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.syphon.SyphonClient
|
||||
/**
|
||||
* This example uses After Effects and OPENRNDR connected via Syphon
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
// The maximum resolution supported by the free
|
||||
// version of AESyphon
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.syphon.SyphonServer
|
||||
import kotlin.math.*
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1000
|
||||
height = 1000
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.draw.renderTarget
|
||||
import org.openrndr.extra.syphon.SyphonServer
|
||||
import kotlin.math.*
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 1000
|
||||
height = 1000
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.extra.triangulation.Delaunay
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extra.videoprofiles.GIFProfile
|
||||
import org.openrndr.extra.videoprofiles.ProresProfile
|
||||
import org.openrndr.ffmpeg.ScreenRecorder
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend(ScreenRecorder()) {
|
||||
profile = GIFProfile()
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.videoprofiles.ProresProfile
|
||||
import org.openrndr.ffmpeg.ScreenRecorder
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend(ScreenRecorder()) {
|
||||
profile = ProresProfile()
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.videoprofiles.TIFFProfile
|
||||
import org.openrndr.ffmpeg.ScreenRecorder
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend(ScreenRecorder()) {
|
||||
profile = TIFFProfile()
|
||||
|
||||
Reference in New Issue
Block a user