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)
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import kotlin.math.cos
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import kotlin.math.cos
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.math.Vector2
|
||||
import org.openrndr.math.map
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
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.extras.color.palettes.rangeTo
|
||||
import org.openrndr.extras.color.presets.CORAL
|
||||
import org.openrndr.extras.color.spaces.toHSLUVa
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extras.color.spaces.toOKLABa
|
||||
import org.openrndr.extras.color.spaces.toOKLCHa
|
||||
import org.openrndr.extras.color.spaces.toXSLUVa
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.openrndr.extras.color.spaces.toXSLUVa
|
||||
import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 800
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.extras.color.spaces.ColorHSLUVa
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.math.Polar
|
||||
import org.openrndr.math.Vector2
|
||||
import kotlin.math.sqrt
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 720
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.draw.loadImage
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.color.statistics.calculateHistogramRGB
|
||||
|
||||
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.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.color.statistics.calculateHistogramRGB
|
||||
import kotlin.math.pow
|
||||
|
||||
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.draw.loadImage
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.color.statistics.calculateHistogramRGB
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
// -- this block is for automation purposes only
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extras.color.spaces.toHSLUVa
|
||||
import org.openrndr.math.Polar
|
||||
import org.openrndr.shape.contour
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
class Arc(val start: Double, val radius: Double, val length: Double, val height: Double) {
|
||||
fun split(offset: Double = 0.0): List<Arc> {
|
||||
val hl = length / 2.0
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import Orx_embed_shaders_gradle.EmbedShadersTask
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
kotlin("plugin.serialization")
|
||||
id("orx.embed-shaders")
|
||||
}
|
||||
|
||||
val kotlinxSerializationVersion: String by rootProject.extra
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlin.random.Random
|
||||
* with a different amount of blur in each layer,
|
||||
* simulating depth of field
|
||||
*/
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 900
|
||||
height = 900
|
||||
|
||||
@@ -29,7 +29,7 @@ import kotlin.random.Random
|
||||
// Toggle to see the difference between a simple blur and multilayer bloom
|
||||
const val effectEnabled = true
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 900
|
||||
height = 900
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.easing.*
|
||||
import org.openrndr.math.Vector2
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -59,7 +59,6 @@ kotlin {
|
||||
|
||||
sourceSets {
|
||||
val shaderKotlin by creating {
|
||||
//this.kotlin.srcDir("$projectDir/build/generated/shaderKotlin")
|
||||
this.kotlin.srcDir(embedShaders.outputDir)
|
||||
}
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.openrndr.extra.fx.demo
|
||||
|
||||
import org.openrndr.applicationSynchronous
|
||||
import org.openrndr.application
|
||||
import org.openrndr.extra.fx.blend.*
|
||||
fun main() {
|
||||
applicationSynchronous {
|
||||
application {
|
||||
program {
|
||||
val add = Add()
|
||||
val colorBurn = ColorBurn()
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openrndr.extra.fx.blur.*
|
||||
import org.openrndr.math.Polar
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.fx.distort.FluidDistort
|
||||
import org.openrndr.extra.fx.patterns.Checkers
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
val fd = FluidDistort()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//import org.openrndr.math.Vector2
|
||||
//import kotlin.math.absoluteValue
|
||||
//
|
||||
//suspend fun main() = application {
|
||||
//fun main() = application {
|
||||
// configure {
|
||||
// width = 1280
|
||||
// height = 720
|
||||
|
||||
@@ -7,6 +7,8 @@ varying vec2 v_texCoord0;
|
||||
uniform vec2 textureSize0;
|
||||
uniform sampler2D tex0;
|
||||
|
||||
uniform bool logPolar;
|
||||
|
||||
#ifndef OR_GL_FRAGCOLOR
|
||||
out vec4 o_color;
|
||||
#endif
|
||||
@@ -16,8 +18,11 @@ out vec4 o_color;
|
||||
void main() {
|
||||
vec2 uv = v_texCoord0 - vec2(0.5);
|
||||
float arg = atan(uv.y, uv.x);
|
||||
float radius = length(uv);
|
||||
vec2 sourceUV = vec2(arg / (2*PI) + 0.5, radius/sqrt(0.5));
|
||||
|
||||
float bias = 0.0;
|
||||
float radius = logPolar? log(1.0 + length(uv)*(exp(1.0)-bias)) / log(1.0+(exp(1.0)-bias)*sqrt(0.5)) : (length(uv) / sqrt(0.5));
|
||||
|
||||
vec2 sourceUV = vec2(arg / (2*PI) + 0.5, radius);
|
||||
|
||||
#ifndef OR_GL_TEXTURE2D
|
||||
vec4 result = texture(tex0, sourceUV);
|
||||
|
||||
@@ -17,13 +17,14 @@ out vec4 o_color;
|
||||
uniform int angleLevels;
|
||||
uniform int radiusLevels;
|
||||
|
||||
uniform bool logPolar;
|
||||
|
||||
void main() {
|
||||
vec2 uv = v_texCoord0 - origin;
|
||||
vec2 uv = v_texCoord0;
|
||||
float arg = (uv.x-0.5) * 2 * PI;
|
||||
float radius = (uv.y) * sqrt(0.5);
|
||||
float radius = logPolar? (((exp(uv.y)-1.0) / (exp(1.0)-1.0))) : uv.y;
|
||||
|
||||
|
||||
vec2 sourceUV = radius * vec2(cos(arg), sin(arg)) + vec2(0.5);
|
||||
vec2 sourceUV = (radius * sqrt(0.5) * vec2(cos(arg), sin(arg)) + vec2(0.5));
|
||||
|
||||
#ifndef OR_GL_TEXTURE2D
|
||||
vec4 result = texture(tex0, sourceUV);
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.compositor.post
|
||||
import org.openrndr.extra.fx.patterns.Checkers
|
||||
import org.openrndr.extra.jumpfill.fx.InnerGlow
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.compositor.post
|
||||
import org.openrndr.extra.fx.patterns.Checkers
|
||||
import org.openrndr.extra.jumpfill.fx.InnerGlow
|
||||
|
||||
suspend fun main() = application {
|
||||
fun main() = application {
|
||||
program {
|
||||
if (System.getProperty("takeScreenshot") == "true") {
|
||||
extend(SingleScreenshot()) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.svg.loadSVG
|
||||
import kotlin.math.min
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.openrndr.extra.jumpfill.ops.*
|
||||
import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.openrndr.svg.loadSVG
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.jumpfill.fx.Skeleton
|
||||
import org.openrndr.extra.jumpfill.fx.StraightSkeleton
|
||||
import org.openrndr.extra.noise.simplex
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.jumpfill.fx.StraightSkeleton
|
||||
import org.openrndr.extra.noise.simplex
|
||||
|
||||
suspend fun main() {
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user