From 2b447be17b0843bd5dc863fbf9ac1cac7d2456ac Mon Sep 17 00:00:00 2001 From: Abe Pazos Date: Thu, 28 Aug 2025 12:39:40 +0200 Subject: [PATCH] [orx-color] Add comment to test caching --- orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt | 14 +++++++++++++- .../src/jvmDemo/kotlin/DemoExtrude03.kt | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt b/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt index 0659d31e..a6ef052f 100644 --- a/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt +++ b/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt @@ -7,6 +7,18 @@ import org.openrndr.extra.meshgenerators.sphereMesh import org.openrndr.math.Vector3 import kotlin.math.cos +/** + * Visualizes a plane of ColorOKLCH colors as small 3D spheres + * inside a 3D box. The plane represents all available hues and chromas. + * The luminosity used to create the colors is modulated over time + * with a slow sine wave. + * Instanced rendering is used to render 90 x 100 colored spheres, + * each with a unique position based on the RGB components of the color. + * + * Since the OKLCH color space is larger than the RGB space, some + * spheres would be outside the 3D box, but they are + * actually clipped to the walls. + */ fun main() = application { configure { width = 720 @@ -54,7 +66,7 @@ fun main() = application { drawer.vertexBufferInstances(listOf(mesh), listOf(instanceData), DrawPrimitive.TRIANGLES, 90 * 100) } - + // Draw the edges of a 3D cube drawer.stroke = ColorRGBa.BLACK.opacify(0.25) drawer.strokeWeight = 10.0 drawer.lineSegments( diff --git a/orx-mesh-generators/src/jvmDemo/kotlin/DemoExtrude03.kt b/orx-mesh-generators/src/jvmDemo/kotlin/DemoExtrude03.kt index 5cb54f7c..be492274 100644 --- a/orx-mesh-generators/src/jvmDemo/kotlin/DemoExtrude03.kt +++ b/orx-mesh-generators/src/jvmDemo/kotlin/DemoExtrude03.kt @@ -6,7 +6,6 @@ import org.openrndr.draw.shadeStyle import org.openrndr.extra.camera.Orbital import org.openrndr.extra.meshgenerators.buildTriangleMesh import org.openrndr.extra.meshgenerators.extrudeContourAdaptive -import org.openrndr.extra.meshgenerators.extrudeContourSteps import org.openrndr.math.Polar import org.openrndr.math.Vector3 import org.openrndr.math.asDegrees