Compare commits

..

5 Commits

Author SHA1 Message Date
edwin
79d9a7971a Bump OPENRNDR, ORX, Panel, Gradle 2019-12-16 18:48:34 +01:00
Edwin Jakobs
d99af16ab8 Bump to ORX 0.3.42 2019-11-29 13:52:05 +01:00
Edwin Jakobs
b781680fb6 Bump to ORX 0.3.41 2019-11-28 16:36:13 +01:00
edwin
e2108f86e5 Bump to OPENRNDR 0.3.36, ORX 0.3.40, Panel 0.3.18 2019-11-25 19:41:26 +01:00
Edwin Jakobs
1ab4b6e538 Add default simple logging
* Bump library versions
 * Bump template version
 * Small clean-up of TemplateProgram.kt
2019-11-10 14:26:16 +01:00
3 changed files with 57 additions and 38 deletions

View File

@@ -1,41 +1,49 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion = "1.3.50"
plugins {
java
kotlin("jvm") version("1.3.50")
}
group = "org.openrndr.template"
version = "0.3.5"
version = "0.3.8"
val applicationMainClass = "TemplateProgramKt"
val applicationFullLogging = 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.37"
val panelUseSnapshot = false
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.19"
val orxUseSnapshot = false
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.44"
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher, orx-fx
// 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-palette, orx-runway
val orxFeatures = setOf("orx-noise", "orx-fx")
// supported features are: video, panel
val openrndrFeatures = setOf("video", "panel")
// --------------------------------------------------------------------------------------------------------------------
val openrndrOs = when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "windows"
OperatingSystem.MAC_OS -> "macos"
OperatingSystem.LINUX -> "linux-x64"
else -> throw IllegalArgumentException("os not supported")
}
enum class Logging {
NONE,
SIMPLE,
FULL
}
// supported features are: video, panel
val openrndrFeatures = setOf("video", "panel")
val applicationLogging = Logging.SIMPLE
val panelUseSnapshot = false
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.17-m3"
val kotlinVersion = "1.3.61"
val orxUseSnapshot = false
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.36"
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher,
// orx-integral-image, orx-interval-tree, orx-jumpflood,orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
// orx-noise, orx-obj, orx-olive
val orxFeatures = setOf("orx-noise")
plugins {
java
kotlin("jvm") version("1.3.61")
}
repositories {
mavenCentral()
@@ -60,22 +68,30 @@ fun DependencyHandler.openrndrNatives(module: String): Any {
dependencies {
runtime(openrndr("gl3"))
runtime(openrndrNatives("gl3"))
compile(openrndr("openal"))
runtime(openrndrNatives("openal"))
compile(openrndr("core"))
compile(openrndr("svg"))
compile(openrndr("animatable"))
compile(openrndr("extensions"))
compile(openrndr("filter"))
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.0")
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.3")
compile("io.github.microutils", "kotlin-logging","1.7.2")
compile("io.github.microutils", "kotlin-logging","1.7.8")
if (!applicationFullLogging) {
runtime("org.slf4j","slf4j-nop","1.7.25")
} else {
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.12.0")
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.8.7")
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.8.7")
when(applicationLogging) {
Logging.NONE -> {
runtime("org.slf4j","slf4j-nop","1.7.29")
}
Logging.SIMPLE -> {
runtime("org.slf4j","slf4j-simple","1.7.29")
}
Logging.FULL -> {
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.13.0")
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.10.1")
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.10.1")
}
}
if ("video" in openrndrFeatures) {
@@ -99,6 +115,8 @@ dependencies {
testCompile("junit", "junit", "4.12")
}
// --------------------------------------------------------------------------------------------------------------------
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}

View File

@@ -1,5 +1,5 @@
#Thu Aug 01 12:32:31 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists

View File

@@ -1,8 +1,10 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.FontImageMap
import org.openrndr.draw.loadFont
import org.openrndr.draw.loadImage
import org.openrndr.draw.tint
import kotlin.math.cos
import kotlin.math.sin
fun main() = application {
configure {
@@ -11,16 +13,15 @@ fun main() = application {
}
program {
val image = loadImage("file:data/images/pm5544.png")
val font = FontImageMap.fromUrl("file:data/fonts/IBMPlexMono-Regular.ttf", 64.0)
val image = loadImage("data/images/pm5544.png")
val font = loadFont("data/fonts/IBMPlexMono-Regular.ttf", 64.0)
extend {
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))
drawer.image(image)
drawer.fill = ColorRGBa.PINK
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.circle(cos(seconds) * width / 2.0 + width / 2.0, sin(0.5 * seconds) * height / 2.0 + height / 2.0, 140.0)
drawer.fontMap = font
drawer.fill = ColorRGBa.WHITE