Reduce duplication in orx build scripts. (#240)
Co-authored-by: hamoid <abe@hamoid.com>
This commit is contained in:
@@ -12,18 +12,14 @@ sourceSets {
|
||||
collectScreenshots(project, demo) { }
|
||||
}
|
||||
|
||||
val openrndrVersion: String by rootProject.extra
|
||||
val openrndrOS: String by rootProject.extra
|
||||
val boofcvVersion = "0.39"
|
||||
|
||||
val demoImplementation by configurations.getting {}
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
dependencies {
|
||||
api("org.boofcv:boofcv-core:$boofcvVersion")
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
api(libs.boofcv)
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
@@ -10,14 +10,15 @@ sourceSets {
|
||||
dependencies {
|
||||
api project(":orx-jvm:orx-osc")
|
||||
|
||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
implementation libs.gson
|
||||
demoImplementation(libs.openrndr.application)
|
||||
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoRuntimeOnly(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoRuntimeOnly(libs.openrndr.ffmpeg.natives)
|
||||
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-ffmpeg-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(project(":orx-fx"))
|
||||
// demoImplementation(project(":orx-osc"))
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
||||
implementation libs.gson
|
||||
implementation(project(":orx-fx"))
|
||||
implementation(project(":orx-jvm:orx-keyframer"))
|
||||
implementation(project(":orx-easing"))
|
||||
@@ -20,11 +20,11 @@ dependencies {
|
||||
demoImplementation(project(":orx-mesh-generators"))
|
||||
demoImplementation(project(":orx-noise"))
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-filter:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoImplementation(libs.openrndr.filter)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -598,6 +598,7 @@ class PBRMaterial : Material {
|
||||
shadeStyle.parameter("textureNoise", noise128)
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
when (val source = texture.source) {
|
||||
is Triplanar -> {
|
||||
@@ -605,6 +606,7 @@ class PBRMaterial : Material {
|
||||
shadeStyle.parameter("textureTriplanarScale$index", source.scale)
|
||||
shadeStyle.parameter("textureTriplanarOffset$index", source.offset)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
if (texture.target is TextureTarget.Height) {
|
||||
val target = texture.target as TextureTarget.Height
|
||||
@@ -691,6 +693,7 @@ class PBRMaterial : Material {
|
||||
if (texture.target is TextureTarget.Height) {
|
||||
when (val source = texture.source) {
|
||||
is TextureFromColorBuffer -> shadeStyle.parameter("texture$index", source.texture)
|
||||
else -> {}
|
||||
}
|
||||
when (val source = texture.source) {
|
||||
is Triplanar -> {
|
||||
@@ -698,6 +701,7 @@ class PBRMaterial : Material {
|
||||
shadeStyle.parameter("textureTriplanarScale$index", source.scale)
|
||||
shadeStyle.parameter("textureTriplanarOffset$index", source.offset)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
val target = texture.target as TextureTarget.Height
|
||||
shadeStyle.parameter("textureHeightScale$index", target.scale)
|
||||
|
||||
@@ -107,6 +107,7 @@ class SceneRenderer {
|
||||
blur.spread = 1.0
|
||||
blur.apply(target.colorBuffer(0), target.colorBuffer(0))
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package org.operndr.extras.filewatcher
|
||||
|
||||
import com.sun.nio.file.SensitivityWatchEventModifier
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.*
|
||||
import mu.KotlinLogging
|
||||
import org.openrndr.Program
|
||||
import org.openrndr.launch
|
||||
@@ -116,6 +113,7 @@ private val watchService by lazy {
|
||||
FileSystems.getDefault().newWatchService()
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
private val watchThread by lazy {
|
||||
thread(isDaemon = true) {
|
||||
while (true) {
|
||||
|
||||
@@ -15,11 +15,11 @@ dependencies {
|
||||
demoImplementation(project(":orx-mesh-generators"))
|
||||
demoImplementation(project(":orx-noise"))
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-filter:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoImplementation(libs.openrndr.filter)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -12,26 +12,21 @@ sourceSets {
|
||||
collectScreenshots(project, demo) { }
|
||||
}
|
||||
|
||||
val openrndrVersion: String by rootProject.extra
|
||||
val openrndrOS: String by rootProject.extra
|
||||
val slf4jVersion: String by rootProject.extra
|
||||
val gsonVersion: String by rootProject.extra
|
||||
val kotlinVersion: String by rootProject.extra
|
||||
val demoImplementation by configurations.getting {}
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
dependencies {
|
||||
api(project(":orx-parameters"))
|
||||
api(project(":orx-jvm:orx-panel"))
|
||||
implementation("org.openrndr:openrndr-filter:$openrndrVersion")
|
||||
implementation("org.openrndr:openrndr-dialogs:$openrndrVersion")
|
||||
implementation("com.google.code.gson:gson:$gsonVersion")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
implementation(libs.openrndr.filter)
|
||||
implementation(libs.openrndr.dialogs)
|
||||
implementation(libs.gson)
|
||||
implementation(libs.kotlin.reflect)
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
|
||||
demoRuntimeOnly("org.slf4j:slf4j-simple:$slf4jVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly(libs.slf4j.simple)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -31,20 +31,21 @@ generateGrammarSource {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
antlr("org.antlr:antlr4:$antlrVersion")
|
||||
implementation("org.antlr:antlr4-runtime:$antlrVersion")
|
||||
antlr(libs.antlr)
|
||||
implementation(libs.antlrRuntime)
|
||||
implementation(project(":orx-noise"))
|
||||
implementation(project(":orx-easing"))
|
||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||
implementation libs.gson
|
||||
implementation(libs.kotlin.reflect)
|
||||
|
||||
demoImplementation(project(":orx-camera"))
|
||||
|
||||
demoImplementation(project(":orx-jvm:orx-panel"))
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
def openrndrOs
|
||||
if (os.windows) { openrndrOs = "windows" }
|
||||
else if (os.macOsX) { openrndrOs = "macos" }
|
||||
else if (os.linux) { openrndrOs = "linux-x64" }
|
||||
|
||||
dependencies {
|
||||
implementation project(":orx-jvm:orx-kinect-v1")
|
||||
runtimeOnly project(":orx-jvm:orx-kinect-v1-natives-$openrndrOs")
|
||||
runtimeOnly "org.openrndr:openrndr-gl3:$openrndrVersion"
|
||||
runtimeOnly "org.openrndr:openrndr-gl3-natives-$openrndrOs:$openrndrVersion"
|
||||
runtimeOnly project(":orx-jvm:orx-kinect-v1-natives-${gradle.ext.openrndrOS}")
|
||||
runtimeOnly libs.openrndr.gl3
|
||||
runtimeOnly libs.openrndr.gl3.natives
|
||||
runtimeOnly "ch.qos.logback:logback-classic:1.2.11"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:linux-arm64"
|
||||
runtimeOnly(variantOf(libs.libfreenect) { classifier("linux-arm64") })
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:linux-x86_64"
|
||||
runtimeOnly(variantOf(libs.libfreenect) { classifier("linux-x86_64") })
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:macosx-x86_64"
|
||||
runtimeOnly(variantOf(libs.libfreenect) { classifier("macosx-x86_64") })
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:libfreenect:$libfreenectVersion:windows-x86_64"
|
||||
runtimeOnly(variantOf(libs.libfreenect) { classifier("windows-x86_64") })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dependencies {
|
||||
api project(":orx-jvm:orx-kinect-common")
|
||||
api "org.bytedeco:libfreenect:$libfreenectVersion"
|
||||
api libs.libfreenect
|
||||
}
|
||||
|
||||
@@ -31,15 +31,17 @@ generateGrammarSource {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
antlr("org.antlr:antlr4:$antlrVersion")
|
||||
implementation("org.antlr:antlr4-runtime:$antlrVersion")
|
||||
antlr(libs.antlr)
|
||||
implementation(libs.antlrRuntime)
|
||||
|
||||
demoImplementation(project(":orx-camera"))
|
||||
demoImplementation(project(":orx-jvm:orx-panel"))
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
val openrndrVersion: String by rootProject.extra
|
||||
val openrndrOS: String by rootProject.extra
|
||||
val slf4jVersion: String by rootProject.extra
|
||||
val kotlinVersion: String by rootProject.extra
|
||||
val demoImplementation by configurations.getting {}
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
@@ -23,12 +19,12 @@ dependencies {
|
||||
api("net.compartmental.code:minim:2.2.2") {
|
||||
exclude(group = "org.apache.maven.plugins", module = "maven-javadoc-plugin")
|
||||
}
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
implementation(libs.kotlin.reflect)
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
|
||||
demoRuntimeOnly("org.slf4j:slf4j-simple:$slf4jVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly(libs.slf4j.simple)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -12,16 +12,17 @@ dependencies {
|
||||
implementation project(":orx-jvm:orx-file-watcher")
|
||||
implementation project(":orx-jvm:orx-kotlin-parser")
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-scripting-jvm:$kotlinVersion"
|
||||
implementation "org.jetbrains.kotlin:kotlin-scripting-jvm-host:$kotlinVersion"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
|
||||
implementation "org.jetbrains.kotlin:kotlin-scripting-jsr223:$kotlinVersion"
|
||||
|
||||
implementation libs.kotlin.scriptingJvm
|
||||
implementation libs.kotlin.scriptingJvmHost
|
||||
implementation libs.kotlin.reflect
|
||||
implementation libs.kotlin.scriptingJSR223
|
||||
|
||||
demoImplementation(project(":orx-camera"))
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.openrndr.extra.olive
|
||||
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.async
|
||||
import mu.KotlinLogging
|
||||
@@ -67,6 +68,7 @@ class Olive<P : Program>(val resources: Resources? = null, private var scriptMod
|
||||
|
||||
private var watcher: (() -> Unit)? = null
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
override fun setup(program: Program) {
|
||||
System.setProperty("idea.io.use.fallback", "true")
|
||||
System.setProperty("org.openrndr.ignoreShadeStyleErrors", "true")
|
||||
@@ -74,22 +76,22 @@ class Olive<P : Program>(val resources: Resources? = null, private var scriptMod
|
||||
val store = mutableMapOf<Event<*>, List<(Any) -> Unit>>()
|
||||
val originalExtensions = program.extensions.map { it }
|
||||
val trackedListeners = listOf<Event<*>>(program.mouse.buttonDown,
|
||||
program.mouse.buttonUp,
|
||||
program.mouse.clicked,
|
||||
program.mouse.dragged,
|
||||
program.mouse.moved,
|
||||
program.mouse.scrolled,
|
||||
program.keyboard.keyUp,
|
||||
program.keyboard.keyDown,
|
||||
program.keyboard.keyRepeat,
|
||||
program.window.drop,
|
||||
program.window.focused,
|
||||
program.window.minimized,
|
||||
program.window.moved,
|
||||
program.window.sized,
|
||||
program.window.unfocused,
|
||||
program.requestAssets,
|
||||
program.produceAssets
|
||||
program.mouse.buttonUp,
|
||||
program.mouse.clicked,
|
||||
program.mouse.dragged,
|
||||
program.mouse.moved,
|
||||
program.mouse.scrolled,
|
||||
program.keyboard.keyUp,
|
||||
program.keyboard.keyDown,
|
||||
program.keyboard.keyRepeat,
|
||||
program.window.drop,
|
||||
program.window.focused,
|
||||
program.window.minimized,
|
||||
program.window.moved,
|
||||
program.window.sized,
|
||||
program.window.unfocused,
|
||||
program.requestAssets,
|
||||
program.produceAssets
|
||||
)
|
||||
|
||||
trackedListeners.forEach { it.saveListeners(store) }
|
||||
|
||||
@@ -12,21 +12,16 @@ sourceSets {
|
||||
collectScreenshots(project, demo) { }
|
||||
}
|
||||
|
||||
val openrndrVersion: String by rootProject.extra
|
||||
val openrndrOS: String by rootProject.extra
|
||||
val slf4jVersion:String by rootProject.extra
|
||||
val kotlinVersion:String by rootProject.extra
|
||||
val gsonVersion:String by rootProject.extra
|
||||
val demoImplementation by configurations.getting {}
|
||||
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-dialogs:$openrndrVersion")
|
||||
demoImplementation("com.google.code.gson:gson:$gsonVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
implementation(libs.kotlin.reflect)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.dialogs)
|
||||
demoImplementation(libs.gson)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class SequenceEditor : SequenceEditorBase("sequence-editor") {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
open class SequenceEditorBase(type: String = "sequence-editor-base") : Element(ElementType(type)), DisposableElement {
|
||||
override var disposed = false
|
||||
|
||||
@@ -57,8 +58,8 @@ open class SequenceEditorBase(type: String = "sequence-editor-base") : Element(E
|
||||
private val footerHeight = 20.0
|
||||
|
||||
internal class ValueChangedEvent(val source: SequenceEditorBase,
|
||||
val oldValue: List<Double>,
|
||||
val newValue: List<Double>)
|
||||
val oldValue: List<Double>,
|
||||
val newValue: List<Double>)
|
||||
|
||||
internal class Events {
|
||||
val valueChanged = Event<ValueChangedEvent>("sequence-editor-base-value-changed")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package org.openrndr.panel.elements
|
||||
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.yield
|
||||
import kotlinx.coroutines.*
|
||||
import mu.KotlinLogging
|
||||
import org.openrndr.*
|
||||
import org.openrndr.draw.Cursor
|
||||
@@ -291,6 +289,7 @@ class Slider : Element(ElementType("slider")), DisposableElement {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun Slider.bind(property: KMutableProperty0<Double>) {
|
||||
var currentValue: Double? = null
|
||||
|
||||
@@ -323,6 +322,7 @@ fun Slider.bind(property: KMutableProperty0<Double>) {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
@JvmName("bindInt")
|
||||
fun Slider.bind(property: KMutableProperty0<Int>) {
|
||||
var currentValue: Int? = null
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package org.openrndr.panel.elements
|
||||
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.*
|
||||
import org.openrndr.KEY_BACKSPACE
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.Drawer
|
||||
import org.openrndr.draw.LineCap
|
||||
import org.openrndr.panel.style.*
|
||||
import kotlinx.coroutines.yield
|
||||
import org.openrndr.KeyModifier
|
||||
import org.openrndr.draw.Cursor
|
||||
import org.openrndr.draw.writer
|
||||
@@ -138,6 +136,7 @@ class Textfield : Element(ElementType("textfield")), DisposableElement {
|
||||
override var disposed: Boolean = false
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun Textfield.bind(property: KMutableProperty0<String>) {
|
||||
GlobalScope.launch {
|
||||
install@ while (!disposed) {
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package org.openrndr.panel.elements
|
||||
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.*
|
||||
import org.openrndr.draw.Drawer
|
||||
import org.openrndr.draw.FontImageMap
|
||||
import org.openrndr.draw.LineCap
|
||||
import org.openrndr.panel.style.*
|
||||
import org.openrndr.shape.Rectangle
|
||||
|
||||
import kotlinx.coroutines.yield
|
||||
import org.openrndr.draw.Writer
|
||||
import org.openrndr.events.Event
|
||||
import org.openrndr.launch
|
||||
@@ -100,6 +98,7 @@ class Toggle : Element(ElementType("toggle")), DisposableElement {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun Toggle.bind(property: KMutableProperty0<Boolean>) {
|
||||
var currentValue = property.get()
|
||||
value = currentValue
|
||||
|
||||
@@ -48,7 +48,7 @@ class Matcher {
|
||||
Combinator.LATER_SIBLING -> if (result == MatchingResult.RESTART_FROM_CLOSEST_DESCENDANT) {
|
||||
return result
|
||||
}
|
||||
Combinator.DESCENDANT -> {
|
||||
Combinator.DESCENDANT, null -> {
|
||||
// intentionally do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,21 +12,17 @@ sourceSets {
|
||||
collectScreenshots(project, demo) { }
|
||||
}
|
||||
|
||||
val openrndrVersion: String by rootProject.extra
|
||||
val openrndrOS: String by rootProject.extra
|
||||
val slf4jVersion:String by rootProject.extra
|
||||
|
||||
val demoImplementation by configurations.getting {}
|
||||
val demoRuntimeOnly by configurations.getting {}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":orx-fx"))
|
||||
implementation(project(":orx-noise"))
|
||||
implementation("org.openrndr:openrndr-filter:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.slf4j:slf4j-simple:$slf4jVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
implementation(libs.openrndr.filter)
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.slf4j.simple)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
@@ -130,6 +130,7 @@ internal class ConvolutionPyramid(width: Int, height: Int,
|
||||
is CubemapAttachment -> it.cubemap.destroy()
|
||||
is ArrayTextureAttachment -> it.arrayTexture.destroy()
|
||||
is ArrayCubemapAttachment -> it.arrayCubemap.destroy()
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
it.detachColorAttachments()
|
||||
|
||||
@@ -25,8 +25,8 @@ dependencies {
|
||||
implementation "com.google.zxing:javase:3.4.0"
|
||||
implementation "io.ktor:ktor-server-netty:1.3.1"
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:librealsense2:$librealsense2Version:linux-x86_64"
|
||||
runtimeOnly(variantOf(libs.librealsense) { classifier("linux-x86_64") })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:librealsense2:$librealsense2Version:macosx-x86_64"
|
||||
runtimeOnly(variantOf(libs.librealsense) { classifier("macosx-x86_64") })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
dependencies {
|
||||
runtimeOnly "org.bytedeco:librealsense2:$librealsense2Version:windows-x86_64"
|
||||
runtimeOnly(variantOf(libs.librealsense) { classifier("windows-x86_64") })
|
||||
}
|
||||
|
||||
@@ -11,13 +11,12 @@ sourceSets {
|
||||
|
||||
|
||||
dependencies {
|
||||
api "org.bytedeco:librealsense2:$librealsense2Version"
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly(project(":orx-jvm:orx-realsense2-natives-$openrndrOS"))
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
api libs.librealsense
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(project(":orx-jvm:orx-realsense2-natives-${gradle.ext.openrndrOS}"))
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
|
||||
}
|
||||
|
||||
@@ -8,14 +8,16 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
implementation(libs.gson)
|
||||
demoImplementation(libs.openrndr.application)
|
||||
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoRuntimeOnly(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoRuntimeOnly(libs.openrndr.ffmpeg.natives)
|
||||
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-ffmpeg-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(project(":orx-fx"))
|
||||
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
dependencies {
|
||||
implementation "org.openrndr:openrndr-application:$openrndrVersion"
|
||||
implementation "org.openrndr:openrndr-gl3:$openrndrVersion"
|
||||
implementation "org.openrndr:openrndr-gl3-natives-macos:$openrndrVersion"
|
||||
implementation libs.openrndr.application
|
||||
implementation libs.openrndr.gl3
|
||||
implementation libs.openrndr.gl3.natives
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.tensorflow:tensorflow-core-api:$tensorflowVersion:linux-x86_64-gpu"
|
||||
runtimeOnly(variantOf(libs.tensorflow) { classifier("linux-x86_64-gpu") })
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.tensorflow:tensorflow-core-api:$tensorflowVersion:windows-x86_64-gpu"
|
||||
runtimeOnly(variantOf(libs.tensorflow) { classifier("windows-x86_64-gpu") })
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.tensorflow:tensorflow-core-api:$tensorflowVersion:linux-x86_64"
|
||||
runtimeOnly(variantOf(libs.tensorflow) { classifier("linux-x86_64") })
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.tensorflow:tensorflow-core-api:$tensorflowVersion:macosx-x86_64"
|
||||
runtimeOnly(variantOf(libs.tensorflow) { classifier("macosx-x86_64") })
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies {
|
||||
runtimeOnly "org.tensorflow:tensorflow-core-api:$tensorflowVersion:windows-x86_64"
|
||||
runtimeOnly(variantOf(libs.tensorflow) { classifier("windows-x86_64") })
|
||||
}
|
||||
@@ -32,19 +32,20 @@ compileWrapgenKotlin {
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
implementation libs.gson
|
||||
demoImplementation(libs.openrndr.application)
|
||||
|
||||
|
||||
demoRuntimeOnly(project(":orx-jvm:orx-tensorflow-natives-$openrndrOS"))
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-ffmpeg-natives-$openrndrOS:$openrndrVersion")
|
||||
demoRuntimeOnly(project(":orx-jvm:orx-tensorflow-natives-${gradle.ext.openrndrOS}"))
|
||||
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoRuntimeOnly(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoRuntimeOnly(libs.openrndr.ffmpeg.natives)
|
||||
demoImplementation(project(":orx-fx"))
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
api("org.tensorflow:tensorflow-core-api:$tensorflowVersion")
|
||||
api(libs.tensorflow)
|
||||
|
||||
// -- wrapgen
|
||||
wrapgenImplementation 'com.github.javaparser:javaparser-core:3.15.21'
|
||||
|
||||
@@ -16,9 +16,9 @@ dependencies {
|
||||
|
||||
implementation("com.github.ricardomatias:delaunator:$delaunatorVersion")
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
@@ -9,11 +9,11 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
demoImplementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
implementation("org.openrndr:openrndr-ffmpeg:$openrndrVersion")
|
||||
demoImplementation(libs.openrndr.application)
|
||||
demoImplementation(libs.openrndr.extensions)
|
||||
demoImplementation(libs.openrndr.ffmpeg)
|
||||
demoRuntimeOnly(libs.openrndr.gl3)
|
||||
demoRuntimeOnly(libs.openrndr.gl3.natives)
|
||||
implementation(libs.openrndr.ffmpeg)
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
Reference in New Issue
Block a user