Bump to OPENRNDR 0.3.44-rc.4, add dynamic circle batch demo

This commit is contained in:
Edwin Jakobs
2020-07-19 22:50:38 +02:00
parent cc2d9522f4
commit 64ad0d0290
3 changed files with 38 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
def openrndrUseSnapshot = false
buildscript {
repositories {
jcenter()
@@ -14,7 +16,7 @@ buildscript {
apply plugin: 'org.jetbrains.dokka'
project.ext {
openrndrVersion = "0.3.44-rc.3"
openrndrVersion = openrndrUseSnapshot? "0.4.0-SNAPSHOT" : "0.3.44-rc.4"
kotlinVersion = "1.3.72"
spekVersion = "2.0.11"
libfreenectVersion = "0.5.7-1.5.3"
@@ -59,6 +61,10 @@ allprojects {
repositories {
if (openrndrUseSnapshot) {
mavenLocal()
}
jcenter()
maven {
url = "https://dl.bintray.com/openrndr/openrndr"

View File

@@ -0,0 +1,31 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.color.hsv
import org.openrndr.extra.noise.simplex
import kotlin.math.abs
/*
This program demonstrates dynamic circle batches
*/
fun main() = application {
program {
extend {
drawer.clear(ColorRGBa.GRAY)
drawer.circles {
this.fill = ColorRGBa.PINK
for (i in 0 until 10000) {
val hue = simplex(i * 403, i * 149.0 + 0.2 * seconds) * 180.0 + 180.0
fill = hsv(hue, 0.5, 0.3).toRGBa()
stroke = hsv(hue + 180.0, 0.5, 1.0).toRGBa()
val x = simplex(i * 337, i * 43.0 + 0.1 * seconds) * width / 2.0 + width / 2.0
val y = simplex(i * 439, i * 39.0 - 0.1 * seconds) * height / 2.0 + height / 2.0
val radius = simplex(i * 139, i * 51.0 + seconds * 0.43) * 20.0 + 20.0
strokeWeight = abs(simplex(i * 139, i * 51.0 + seconds * 0.43) * radius * 0.5)
circle(x, y, radius)
}
}
}
}
}

View File

@@ -1,8 +1,6 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
import org.openrndr.extras.camera.Orbital
import org.openrndr.extras.meshgenerators.boxMesh
import org.openrndr.math.Vector3
import org.openrndr.resourceUrl