Fix demos, upgrade to Gradle 7.2
This commit is contained in:
@@ -24,14 +24,17 @@ kotlin {
|
||||
val demo by creating {
|
||||
defaultSourceSet {
|
||||
kotlin.srcDir("src/demo")
|
||||
dependencies {
|
||||
implementation(project(":orx-camera"))
|
||||
implementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
implementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
runtimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
implementation(compilations["main"]!!.output.allOutputs)
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation(project(":orx-camera"))
|
||||
implementation(project(":orx-mesh-generators"))
|
||||
implementation(project(":orx-color"))
|
||||
|
||||
implementation("org.openrndr:openrndr-application:$openrndrVersion")
|
||||
implementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
runtimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
runtimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
implementation(compilations["main"]!!.output.allOutputs)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +65,7 @@ kotlin {
|
||||
implementation("io.github.microutils:kotlin-logging:$kotlinLoggingVersion")
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
@@ -72,6 +76,9 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
val jvmMain by getting {}
|
||||
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
@file:JvmName("HistogramJvm")
|
||||
package org.openrndr.extras.color.statistics
|
||||
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import kotlin.jvm.JvmName
|
||||
import kotlin.random.Random
|
||||
|
||||
private fun ColorRGBa.binIndex(binCount: Int): Triple<Int, Int, Int> {
|
||||
internal fun ColorRGBa.binIndex(binCount: Int): Triple<Int, Int, Int> {
|
||||
val rb = (r * binCount).toInt().coerceIn(0, binCount - 1)
|
||||
val gb = (g * binCount).toInt().coerceIn(0, binCount - 1)
|
||||
val bb = (b * binCount).toInt().coerceIn(0, binCount - 1)
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
package org.openrndr.extras.color.statistics
|
||||
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import kotlin.random.Random
|
||||
|
||||
fun calculateHistogramRGB(buffer: ColorBuffer,
|
||||
binCount: Int = 16,
|
||||
weighting: ColorRGBa.() -> Double = { 1.0 },
|
||||
Reference in New Issue
Block a user