All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
commonMain.ExpressionDelegate.kt Maven / Gradle / Ivy
package org.openrndr.extra.expressions
import org.openrndr.extra.propertywatchers.watchingProperty
import kotlin.reflect.KProperty0
fun watchingExpression1(
expressionProperty: KProperty0,
parameter0: String = "x",
constants: Map = emptyMap(),
functions: FunctionExtensions = FunctionExtensions.EMPTY,
error: (p0: Double) -> Double = { 0.0 }
) =
watchingProperty(expressionProperty) {
compileFunction1(it, parameter0, constants, functions, error)
}
fun watchingExpression2(
expressionProperty: KProperty0,
parameter0: String = "x",
parameter1: String = "y",
constants: Map = emptyMap(),
functions: FunctionExtensions = FunctionExtensions.EMPTY,
error: (p0: Double, p1: Double) -> Double = { _, _ -> 0.0 }
) =
watchingProperty(expressionProperty) {
compileFunction2(it, parameter0, parameter1, constants, functions, error)
}
fun watchingExpression3(
expressionProperty: KProperty0,
parameter0: String = "x",
parameter1: String = "y",
parameter2: String = "z",
constants: Map = emptyMap(),
functions: FunctionExtensions = FunctionExtensions.EMPTY,
error: (p0: Double, p1: Double, p2: Double) -> Double = { _, _, _ -> 0.0 }
) =
watchingProperty(expressionProperty) {
compileFunction3(it, parameter0, parameter1, parameter2, constants, functions, error)
}