[orx-processing] Upgrade to 4.4.0, add demo with curves
This commit is contained in:
@@ -29,7 +29,7 @@ ktor = "3.1.2"
|
||||
jgit = "7.1.0.202411261347-r"
|
||||
javaosc = "0.9"
|
||||
jsoup = "1.19.1"
|
||||
processing = "4.3.4"
|
||||
processing = "4.4.0"
|
||||
|
||||
[libraries]
|
||||
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "kotlinLogging" }
|
||||
|
||||
@@ -11,4 +11,5 @@ dependencies {
|
||||
implementation(libs.openrndr.math)
|
||||
implementation(libs.kotlin.reflect)
|
||||
demoRuntimeOnly(libs.slf4j.simple)
|
||||
demoImplementation(project(":orx-shapes"))
|
||||
}
|
||||
26
orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt
Normal file
26
orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt
Normal file
@@ -0,0 +1,26 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.processing.PShape
|
||||
import org.openrndr.extra.processing.toShape
|
||||
import org.openrndr.extra.shapes.primitives.regularStarRounded
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val c = regularStarRounded(
|
||||
points = 5,
|
||||
innerRadius = 100.0,
|
||||
outerRadius = 200.0,
|
||||
innerFactor = 0.25,
|
||||
outerFactor = 0.75,
|
||||
center = drawer.bounds.center
|
||||
)
|
||||
val ps = PShape(c)
|
||||
val rc = ps.toShape()
|
||||
extend {
|
||||
drawer.fill = ColorRGBa.PINK.opacify(0.5)
|
||||
drawer.shape(rc)
|
||||
drawer.translate(15.0, 15.0)
|
||||
drawer.contour(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user