[orx-shade-styles] Write comments on demos
This commit is contained in:
@@ -6,19 +6,12 @@ import org.openrndr.extra.shadestyles.fills.clip.clip
|
||||
import org.openrndr.extra.shadestyles.fills.gradients.gradient
|
||||
|
||||
/**
|
||||
* The main entry point of the application that sets up the visual program.
|
||||
* Demonstrates how to combine two shade styles
|
||||
* (a conic gradient and a rounded star clipping)
|
||||
* by using the `+` operator.
|
||||
*
|
||||
* This method creates a graphical program with a 720x720 window and uses a rotating
|
||||
* gradient-shaded rectangle as the primary visual element. It demonstrates the use
|
||||
* of gradient shading and clipping through a compositional approach.
|
||||
*
|
||||
* The method performs the following actions:
|
||||
* 1. Configures the application window size.
|
||||
* 2. Constructs a conic gradient with a rotation of 54 degrees and full circular coverage.
|
||||
* 3. Creates a star-shaped clip with configurable sharpness, radius, and number of sides.
|
||||
* 4. Combines the gradient and clip into a composite shading style.
|
||||
* 5. Defines a program loop where the rectangle with the gradient and clip combination
|
||||
* rotates around the center of the canvas while being redrawn continuously.
|
||||
* The design is animated by applying a rotation transformation matrix
|
||||
* based in the `seconds` variable.
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
|
||||
Reference in New Issue
Block a user