[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

@@ -7,6 +7,14 @@ import org.openrndr.extra.shadestyles.fills.gradients.gradient
import org.openrndr.math.Vector2
import kotlin.math.cos
/**
* Demonstrates how to create 4 animated gradient shade-styles with 5 colors:
* - a linear gradient
* - a stellar gradient
* - a radial gradient
* - a linear gradient with `SpreadMethod.REPEAT`
* Each gradient style has different adjustable attributes.
*/
fun main() {
application {
configure {
@@ -25,7 +33,6 @@ fun main() {
linear {
start = Vector2(0.1, 0.1).rotate(seconds * 36.0, Vector2(0.5, 0.5))
end = Vector2(0.9, 0.9).rotate(seconds * 36.0, Vector2(0.5, 0.5))
}
}
drawer.rectangle(0.0, 0.0, 360.0, 360.0)