Switch back to fun main()
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.loadImage
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val image16 = loadImage("demo-data/images/16-bit.png")
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.application
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.contour
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
class A: Animatable() {
|
||||
var x = 0.0
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.application
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.contour
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val a = object {
|
||||
var x = 0.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.internal.colorBufferLoader
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.math.Vector2
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
|
||||
configure {
|
||||
multisample = WindowMultisample.SampleCount(8)
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.math.CatmulRomChain2
|
||||
import org.openrndr.math.CatmullRomChain2
|
||||
import org.openrndr.math.Polar
|
||||
import org.openrndr.shape.ShapeContour
|
||||
import org.openrndr.shape.toContour
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val points = List(6) { Polar(it * 70.0, 100.0).cartesian + drawer.bounds.center }
|
||||
val cmr = CatmulRomChain2(points, 1.0, loop = true)
|
||||
val cmr = CatmullRomChain2(points, 1.0, loop = true)
|
||||
val contour = ShapeContour.fromPoints(cmr.positions(200), true)
|
||||
|
||||
extend {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.color.ColorRGBa
|
||||
/*
|
||||
This demo just verifies that drawing a single circle still works with revamped circle drawing code
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.GRAY)
|
||||
|
||||
@@ -11,7 +11,7 @@ Batches are (currently) static but stored in GPU memory but can be
|
||||
animated using a vertex shader. Batches are fast to draw.
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val batch = drawer.circleBatch {
|
||||
for (i in 0 until 2000) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlin.math.abs
|
||||
This program demonstrates dynamic circle batches
|
||||
*/
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
extend {
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.draw.*
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val cb0 = loadImage("demo-data/images/image-001.png")
|
||||
val cb1 = cb0.createEquivalent()
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.shape.drawComposition
|
||||
import org.openrndr.svg.toSVG
|
||||
import org.openrndr.svg.writeSVG
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend {
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.shape.ClipMode
|
||||
import org.openrndr.shape.drawComposition
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val cd = drawComposition {
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.shape.ClipMode
|
||||
import org.openrndr.shape.drawComposition
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val cd = drawComposition {
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.shape.Circle
|
||||
*
|
||||
* This was made to assist in resolving https://github.com/openrndr/openrndr/issues/164
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val c = Circle(200.0, 200.0, 10.0).contour
|
||||
extend {
|
||||
|
||||
@@ -18,7 +18,7 @@ fun arc(start: Vector2, end: Vector2, radius: Double): ShapeContour {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 800
|
||||
height = 800
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.draw.isolated
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.shape.Circle
|
||||
import org.openrndr.shape.Rectangle
|
||||
import org.openrndr.shape.intersections
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend {
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlin.math.PI
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val points = 200
|
||||
extend {
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.draw.shadeStyle
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
val cubemap = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.draw.*
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cube = boxMesh()
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.draw.*
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cube = boxMesh()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.loadImage
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val image = loadImage("demo-data/images/image-001.dds")
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.extras.meshgenerators.boxMesh
|
||||
import org.openrndr.resourceText
|
||||
import org.openrndr.resourceUrl
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val vb = boxMesh()
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.internal.Driver
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
val shader = Shader.createFromCode(vsCode =
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.internal.Driver
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val cb = colorBuffer(128, 128)
|
||||
extend {
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.*
|
||||
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val cb = colorBuffer(128, 128)
|
||||
val at = arrayTexture(128, 128, 32)
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.openrndr.shape.Triangle
|
||||
* a 3x3 grid of triangles and lines.
|
||||
*/
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.draw.shadeStyle
|
||||
import org.openrndr.extensions.Screenshots
|
||||
import org.openrndr.math.Polar
|
||||
import org.openrndr.shape.contour
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val style = shadeStyle {
|
||||
//fragmentTransform = "x_stroke.a *= step(0.5, fract(c_contourPosition / p_dashLen));"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import org.openrndr.CursorType
|
||||
import org.openrndr.application
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
keyboard.character.listen {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.pointBatch
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val storedBatch = drawer.pointBatch {
|
||||
for (y in 10 until height step 20) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extras.meshgenerators.boxMesh
|
||||
import org.openrndr.ffmpeg.VideoPlayerFFMPEG
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val cube = boxMesh()
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.resourceText
|
||||
import org.openrndr.resourceUrl
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val vb = vertexBuffer(vertexFormat {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.resourceText
|
||||
import org.openrndr.resourceUrl
|
||||
import org.openrndr.shape.Ellipse
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val ellipse = Ellipse(width/2.0, height/2.0, 100.0, 300.0).contour
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.resourceText
|
||||
import org.openrndr.resourceUrl
|
||||
import org.openrndr.shape.Ellipse
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.openrndr.shape.path3D
|
||||
import org.openrndr.extra.shaderphrases.preprocessedFromUrls
|
||||
import kotlin.math.cos
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend(Orbital())
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extensions.Screenshots
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val volumeTexture = VolumeTexture.create(128,128,32)
|
||||
val rt = renderTarget(128, 128) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.noise.Random
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val margin = 5.0
|
||||
val squareSize = 100.0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.GRAY)
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.rectangleBatch
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
val batch = drawer.rectangleBatch {
|
||||
fill = ColorRGBa.PINK
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.GRAY)
|
||||
|
||||
Reference in New Issue
Block a user