Fix demos, upgrade to Gradle 7.2
This commit is contained in:
@@ -29,15 +29,9 @@ fun ((Int, Double, Double, Double) -> Double).crossFade(
|
||||
return { seed, x, y, z ->
|
||||
val a = z.map(start, end, 0.0, 1.0).mod_(1.0)
|
||||
val f = (a / width).coerceAtMost(1.0)
|
||||
|
||||
val o = this(seed, x, y, a.map(0.0, 1.0, start, end)) * f + (1.0 - f) * this(
|
||||
seed,
|
||||
x,
|
||||
y,
|
||||
(a + 1.0).map(0.0, 1.0, start, end)
|
||||
)
|
||||
o
|
||||
|
||||
val o = this(seed, x, y, a.map(0.0, 1.0, start, end)) * f
|
||||
val s = this(seed, x, y, (a + 1.0).map(0.0, 1.0, start, end) * (1.0 - f))
|
||||
o + s
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,4 +125,7 @@ inline fun ((Int, Double, Double, Double) -> Double).perturb(crossinline distort
|
||||
inline fun ((Int, Vector4) -> Double).perturb(crossinline distort: (Vector4) -> Vector4): (Int, Vector4) -> Double =
|
||||
{ seed, v ->
|
||||
this(seed, distort(v))
|
||||
}
|
||||
}
|
||||
|
||||
typealias IDDD_D = ((Int, Double, Double, Double) -> Double)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.LineJoin
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.noise.perturb
|
||||
import org.openrndr.extra.noise.simplex
|
||||
import org.openrndr.extra.noise.simplex1D
|
||||
import org.openrndr.extra.noise.simplex2D
|
||||
@@ -10,6 +11,7 @@ import org.openrndr.extra.noise.withVector2Output
|
||||
import org.openrndr.extra.noise.gradient
|
||||
import org.openrndr.shape.contour
|
||||
|
||||
typealias IDDD_D = ((Int, Double, Double, Double) -> Double)
|
||||
suspend fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
@@ -21,6 +23,10 @@ suspend fun main() = application {
|
||||
this.outputFile = System.getProperty("screenshotPath")
|
||||
}
|
||||
}
|
||||
|
||||
val c = simplex3D.perturb({v->v})::class
|
||||
println(c)
|
||||
println(IDDD_D::perturb)
|
||||
val n = simplex3D.withVector2Output().gradient()
|
||||
extend {
|
||||
drawer.stroke = null
|
||||
|
||||
Reference in New Issue
Block a user