Skip to content

Commit

Permalink
Upgrade to OPENRNDR 0.4 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Jun 22, 2021
1 parent 579ddf9 commit 9435907
Show file tree
Hide file tree
Showing 339 changed files with 460 additions and 497 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
repository: openrndr/openrndr
path: openrndr
ref: openrndr-0.4
- uses: actions/checkout@v2.3.4
with:
path: orx
- uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v2.3.4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build OPENRNDR snapshot
run: |
cd ~/openrndr
./gradlew publishToMavenLocal -Prelease.version=0.5.1-SNAPSHOT
- name: Build ORX
run: |
cd ~/orx
./gradlew build
47 changes: 0 additions & 47 deletions .github/workflows/generate-screenshots.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/release-candidate-to-bintray.yml

This file was deleted.

9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ plugins {
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
}

def openrndrUseSnapshot = false
def openrndrUseSnapshot = true

apply plugin: 'org.jetbrains.dokka'

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

project.ext {
openrndrVersion = openrndrUseSnapshot? "0.4.0-SNAPSHOT" : "0.3.58"
openrndrVersion = openrndrUseSnapshot? "0.5.1-SNAPSHOT" : "0.4.0"
kotlinVersion = "1.5.0"
spekVersion = "2.0.15"
libfreenectVersion = "0.5.7-1.5.5"
librealsense2Version = "2.40.0-1.5.5"
gsonVersion = "2.8.6"
antlrVersion = "4.9.1"
antlrVersion = "4.9.2"
tensorflowVersion = "0.3.1"
mklDnnVersion = "0.21.5-1.5.5"
}
Expand Down Expand Up @@ -77,8 +77,7 @@ allprojects {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'io.github.microutils:kotlin-logging-jvm:2.0.6'
implementation "org.openrndr:openrndr-core:$openrndrVersion"
implementation "org.openrndr:openrndr-filter:$openrndrVersion"
implementation "org.openrndr:openrndr-application:$openrndrVersion"
implementation "org.openrndr:openrndr-shape:$openrndrVersion"
implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.4.3'
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spekVersion"
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
demoImplementation(project(":orx-shader-phrases"))
demoImplementation("org.slf4j:slf4j-simple:1.7.30")

demoImplementation("org.openrndr:openrndr-core:$openrndrVersion")
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
demoImplementation("org.openrndr:openrndr-svg:$openrndrVersion")
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/Demo16BitPng.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import org.openrndr.application
import org.openrndr.draw.loadImage

fun main() {
suspend fun main() {
application {
program {
val image16 = loadImage("demo-data/images/16-bit.png")
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoAnimation01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.openrndr.application
import org.openrndr.math.Vector2
import org.openrndr.shape.contour

fun main() = application {
suspend fun main() = application {
program {
class A: Animatable() {
var x = 0.0
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoAnimation02.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.openrndr.application
import org.openrndr.math.Vector2
import org.openrndr.shape.contour

fun main() = application {
suspend fun main() = application {
program {
val a = object {
var x = 0.0
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoAsyncImages01.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.openrndr.application
import org.openrndr.internal.colorBufferLoader

fun main() {
suspend fun main() {
application {
program {
extend {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoBillboardCircles01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.openrndr.math.Vector2
import org.openrndr.math.Vector3


fun main() = application {
suspend fun main() = application {

configure {
multisample = WindowMultisample.SampleCount(8)
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCatmullRom01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.openrndr.math.Polar
import org.openrndr.shape.ShapeContour
import org.openrndr.shape.toContour

fun main() = application {
suspend fun main() = application {
program {
val points = List(6) { Polar(it * 70.0, 100.0).cartesian + drawer.bounds.center }
val cmr = CatmullRomChain2(points, 1.0, loop = true)
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCircleBatch01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
fun main() = application {
suspend fun main() = application {
program {
extend {
drawer.clear(ColorRGBa.GRAY)
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCircleBatch02.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

fun main() = application {
suspend fun main() = application {
program {
val batch = drawer.circleBatch {
for (i in 0 until 2000) {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCircleBatch03.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlin.math.abs
This program demonstrates dynamic circle batches
*/

fun main() = application {
suspend fun main() = application {
program {

extend {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoColorBufferCopy01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.openrndr.draw.*
import org.openrndr.extras.camera.Orbital
import org.openrndr.extras.meshgenerators.boxMesh

fun main() = application {
suspend fun main() = application {
program {
val cb0 = loadImage("demo-data/images/image-001.png")
val cb1 = cb0.createEquivalent()
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCompositionDrawer01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.openrndr.shape.drawComposition
import org.openrndr.svg.toSVG
import org.openrndr.svg.writeSVG

fun main() {
suspend fun main() {
application {
program {
extend {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCompositionDrawer02.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
import org.openrndr.shape.ClipMode
import org.openrndr.shape.drawComposition

fun main() {
suspend fun main() {
application {
program {
val cd = drawComposition {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoCompositionDrawer03.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.openrndr.color.ColorRGBa
import org.openrndr.shape.ClipMode
import org.openrndr.shape.drawComposition

fun main() {
suspend fun main() {
application {
program {
val cd = drawComposition {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoContour01.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.openrndr.shape.Circle
*
* This was made to assist in resolving https://github.com/openrndr/openrndr/issues/164
*/
fun main() = application {
suspend fun main() = application {
program {
val c = Circle(200.0, 200.0, 10.0).contour
extend {
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoContour02.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun arc(start: Vector2, end: Vector2, radius: Double): ShapeContour {
}
}

fun main() = application {
suspend fun main() = application {
configure {
width = 800
height = 800
Expand Down
2 changes: 1 addition & 1 deletion openrndr-demos/src/demo/kotlin/DemoContour03.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.openrndr.draw.isolated
import org.openrndr.shape.Circle
import org.openrndr.shape.Rectangle

fun main() {
suspend fun main() {
application {
configure {
width = 720
Expand Down
74 changes: 37 additions & 37 deletions openrndr-demos/src/demo/kotlin/DemoContourIntersections01.kt
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.shape.Ellipse
import org.openrndr.shape.OrientedEllipse
import org.openrndr.shape.intersections

fun main() {
application {
program {
val c1 = Ellipse(width / 2.0, height / 2.0, 200.0, 100.0).contour
extend {
drawer.clear(ColorRGBa.PINK)
drawer.fill = null
val c2 = OrientedEllipse(mouse.position, 100.0, 200.0, seconds*45.0).contour
drawer.contour(c1)
//drawer.contour(c2)
val ints = intersections(c1, c2)

if (ints.isEmpty()) {
drawer.contour(c2)
} else {
(ints + ints.take(1)).map { it.b.contourT }.zipWithNext().forEach {
val end = if (it.second <= it.first) it.second + 1.0 else it.second
val sub = c2.sub(it.first, end)
val l = sub.length
val ta = sub.tForLength(15.0)
val tb = sub.tForLength(l - 15.0)
drawer.contour(sub.sub(ta, tb))
}
}
for (i in ints) {
drawer.circle(i.position, 10.0)
}
}
}
}
}
//import org.openrndr.application
//import org.openrndr.color.ColorRGBa
//import org.openrndr.shape.Ellipse
//import org.openrndr.shape.OrientedEllipse
//import org.openrndr.shape.intersections
//
//fun main() {
// application {
// program {
// val c1 = Ellipse(width / 2.0, height / 2.0, 200.0, 100.0).contour
// extend {
// drawer.clear(ColorRGBa.PINK)
// drawer.fill = null
// val c2 = OrientedEllipse(mouse.position, 100.0, 200.0, seconds*45.0).contour
// drawer.contour(c1)
// //drawer.contour(c2)
// val ints = intersections(c1, c2)
//
// if (ints.isEmpty()) {
// drawer.contour(c2)
// } else {
// (ints + ints.take(1)).map { it.b.contourT }.zipWithNext().forEach {
// val end = if (it.second <= it.first) it.second + 1.0 else it.second
// val sub = c2.sub(it.first, end)
// val l = sub.length
// val ta = sub.tForLength(15.0)
// val tb = sub.tForLength(l - 15.0)
// drawer.contour(sub.sub(ta, tb))
// }
// }
// for (i in ints) {
// drawer.circle(i.position, 10.0)
// }
// }
// }
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.openrndr.shape.Circle
import org.openrndr.shape.Rectangle
import org.openrndr.shape.intersections

fun main() {
suspend fun main() {
application {
program {
extend {
Expand Down
Loading

0 comments on commit 9435907

Please sign in to comment.