[orx-color] Add comment to test caching
This commit is contained in:
@@ -7,6 +7,18 @@ import org.openrndr.extra.meshgenerators.sphereMesh
|
|||||||
import org.openrndr.math.Vector3
|
import org.openrndr.math.Vector3
|
||||||
import kotlin.math.cos
|
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 {
|
fun main() = application {
|
||||||
configure {
|
configure {
|
||||||
width = 720
|
width = 720
|
||||||
@@ -54,7 +66,7 @@ fun main() = application {
|
|||||||
drawer.vertexBufferInstances(listOf(mesh), listOf(instanceData), DrawPrimitive.TRIANGLES, 90 * 100)
|
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.stroke = ColorRGBa.BLACK.opacify(0.25)
|
||||||
drawer.strokeWeight = 10.0
|
drawer.strokeWeight = 10.0
|
||||||
drawer.lineSegments(
|
drawer.lineSegments(
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import org.openrndr.draw.shadeStyle
|
|||||||
import org.openrndr.extra.camera.Orbital
|
import org.openrndr.extra.camera.Orbital
|
||||||
import org.openrndr.extra.meshgenerators.buildTriangleMesh
|
import org.openrndr.extra.meshgenerators.buildTriangleMesh
|
||||||
import org.openrndr.extra.meshgenerators.extrudeContourAdaptive
|
import org.openrndr.extra.meshgenerators.extrudeContourAdaptive
|
||||||
import org.openrndr.extra.meshgenerators.extrudeContourSteps
|
|
||||||
import org.openrndr.math.Polar
|
import org.openrndr.math.Polar
|
||||||
import org.openrndr.math.Vector3
|
import org.openrndr.math.Vector3
|
||||||
import org.openrndr.math.asDegrees
|
import org.openrndr.math.asDegrees
|
||||||
|
|||||||
Reference in New Issue
Block a user