Reduce duplication in orx build scripts. (#240)
Co-authored-by: hamoid <abe@hamoid.com>
This commit is contained in:
@@ -9,9 +9,9 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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,9 +1,6 @@
|
||||
package org.openrndr.extra.kdtree
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.*
|
||||
import org.openrndr.math.*
|
||||
import java.util.*
|
||||
import kotlin.IllegalStateException
|
||||
@@ -99,6 +96,7 @@ private fun <T> insertItem(root: KDTreeNode<T>, item: T): KDTreeNode<T> {
|
||||
}
|
||||
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun <T> buildKDTree(items: MutableList<T>, dimensions: Int, mapper: (T, Int) -> Double): KDTreeNode<T> {
|
||||
val root = KDTreeNode<T>(dimensions, mapper)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user