diff --git a/build.gradle b/build.gradle index c0078fb7..aa23836e 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/openrndr-demos/src/demo/kotlin/DemoCircleBatch03.kt b/openrndr-demos/src/demo/kotlin/DemoCircleBatch03.kt new file mode 100644 index 00000000..c23e08ca --- /dev/null +++ b/openrndr-demos/src/demo/kotlin/DemoCircleBatch03.kt @@ -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) + } + } + } + } +} \ No newline at end of file diff --git a/openrndr-demos/src/demo/kotlin/DemoTessShader01.kt b/openrndr-demos/src/demo/kotlin/DemoTessShader01.kt index 7be9c755..33ee1bbc 100644 --- a/openrndr-demos/src/demo/kotlin/DemoTessShader01.kt +++ b/openrndr-demos/src/demo/kotlin/DemoTessShader01.kt @@ -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