Compare commits
1 Commits
openrndr-t
...
openrndr-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d6ac87a34 |
@@ -8,17 +8,10 @@ plugins {
|
|||||||
kotlin("jvm") version("1.3.50")
|
kotlin("jvm") version("1.3.50")
|
||||||
}
|
}
|
||||||
group = "org.openrndr.template"
|
group = "org.openrndr.template"
|
||||||
version = "0.3.6"
|
version = "0.3.2"
|
||||||
|
|
||||||
val applicationMainClass = "TemplateProgramKt"
|
val applicationMainClass = "TemplateProgramKt"
|
||||||
|
val applicationFullLogging = false
|
||||||
enum class Logging {
|
|
||||||
NONE,
|
|
||||||
SIMPLE,
|
|
||||||
FULL
|
|
||||||
}
|
|
||||||
|
|
||||||
val applicationLogging = Logging.SIMPLE
|
|
||||||
|
|
||||||
val openrndrUseSnapshot = false
|
val openrndrUseSnapshot = false
|
||||||
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.35"
|
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.35"
|
||||||
@@ -36,11 +29,11 @@ val panelUseSnapshot = false
|
|||||||
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.17-m3"
|
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.17-m3"
|
||||||
|
|
||||||
val orxUseSnapshot = false
|
val orxUseSnapshot = false
|
||||||
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.38"
|
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.32"
|
||||||
|
|
||||||
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher,
|
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher, orx-kinect-v1
|
||||||
// orx-integral-image, orx-interval-tree, orx-jumpflood,orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
|
// orx-integral-image, orx-interval-tree, orx-jumpflood,orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
|
||||||
// orx-noise, orx-obj, orx-olive, orx-osc
|
// orx-noise, orx-obj, orx-olive
|
||||||
|
|
||||||
val orxFeatures = setOf("orx-noise")
|
val orxFeatures = setOf("orx-noise")
|
||||||
|
|
||||||
@@ -73,23 +66,17 @@ dependencies {
|
|||||||
compile(openrndr("extensions"))
|
compile(openrndr("extensions"))
|
||||||
compile(openrndr("filter"))
|
compile(openrndr("filter"))
|
||||||
|
|
||||||
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.0")
|
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.0-RC")
|
||||||
|
|
||||||
compile("io.github.microutils", "kotlin-logging","1.7.6")
|
compile("io.github.microutils", "kotlin-logging","1.7.2")
|
||||||
|
|
||||||
when(applicationLogging) {
|
if (!applicationFullLogging) {
|
||||||
Logging.NONE -> {
|
runtime("org.slf4j","slf4j-nop","1.7.25")
|
||||||
runtime("org.slf4j","slf4j-nop","1.7.29")
|
} else {
|
||||||
}
|
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.12.0")
|
||||||
Logging.SIMPLE -> {
|
|
||||||
runtime("org.slf4j","slf4j-simple","1.7.29")
|
|
||||||
}
|
|
||||||
Logging.FULL -> {
|
|
||||||
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.12.1")
|
|
||||||
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.8.7")
|
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.8.7")
|
||||||
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.8.7")
|
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.8.7")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ("video" in openrndrFeatures) {
|
if ("video" in openrndrFeatures) {
|
||||||
compile(openrndr("ffmpeg"))
|
compile(openrndr("ffmpeg"))
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import org.openrndr.application
|
import org.openrndr.application
|
||||||
import org.openrndr.color.ColorRGBa
|
import org.openrndr.color.ColorRGBa
|
||||||
import org.openrndr.draw.loadFont
|
import org.openrndr.draw.FontImageMap
|
||||||
import org.openrndr.draw.loadImage
|
import org.openrndr.draw.loadImage
|
||||||
import org.openrndr.draw.tint
|
import org.openrndr.draw.tint
|
||||||
import kotlin.math.cos
|
|
||||||
import kotlin.math.sin
|
|
||||||
|
|
||||||
fun main() = application {
|
fun main() = application {
|
||||||
configure {
|
configure {
|
||||||
@@ -14,15 +12,15 @@ fun main() = application {
|
|||||||
|
|
||||||
program {
|
program {
|
||||||
|
|
||||||
val image = loadImage("data/images/pm5544.png")
|
val image = loadImage("file:data/images/pm5544.png")
|
||||||
val font = loadFont("data/fonts/IBMPlexMono-Regular.ttf", 64.0)
|
val font = FontImageMap.fromUrl("file:data/fonts/IBMPlexMono-Regular.ttf", 64.0)
|
||||||
|
|
||||||
extend {
|
extend {
|
||||||
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))
|
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))
|
||||||
drawer.image(image)
|
drawer.image(image)
|
||||||
|
|
||||||
drawer.fill = ColorRGBa.PINK
|
drawer.fill = ColorRGBa.PINK
|
||||||
drawer.circle(cos(seconds) * width / 2.0 + width / 2.0, sin(0.5 * seconds) * height / 2.0 + height / 2.0, 140.0)
|
drawer.circle(Math.cos(seconds)*width/2.0+width/2.0, Math.sin(0.5*seconds)*height/2.0 + height/2.0, 140.0)
|
||||||
|
|
||||||
drawer.fontMap = font
|
drawer.fontMap = font
|
||||||
drawer.fill = ColorRGBa.WHITE
|
drawer.fill = ColorRGBa.WHITE
|
||||||
|
|||||||
Reference in New Issue
Block a user