[orx-shade-styles] Write comments on demos

This commit is contained in:
Abe Pazos
2025-09-20 19:07:38 +02:00
parent ec9ec947a6
commit ec4032c452
29 changed files with 298 additions and 61 deletions

View File

@@ -11,6 +11,10 @@ import org.openrndr.extra.shadestyles.fills.gradients.gradient
import org.openrndr.extra.shadestyles.fills.patterns.pattern
import kotlin.math.cos
/**
* Demonstrates the use of a complex shade style made by combining an
* animated `pattern`, a `gradient` and a `clip`.
*/
fun main() = application {
configure {
width = 720
@@ -23,7 +27,7 @@ fun main() = application {
backgroundColor = ColorRGBa.DARK_GRAY
foregroundColor = ColorRGBa.PEACH_PUFF
patternUnits = FillUnits.WORLD
parameter("time", seconds*0.1)
parameter("time", seconds * 0.1)
scale = 0.2
crosses {
width = 1.0
@@ -35,7 +39,7 @@ fun main() = application {
stops[1.0] = ColorRGBa.BLACK
stops[0.5] = ColorRGBa.WHITE
stops[0.0] = ColorRGBa.WHITE
conic { }
conic { }
} + clip {
star {
sides = 36
@@ -53,7 +57,6 @@ fun main() = application {
// drawer.text("Patterns", 10.0, height / 2.0)
}
}
}