Fixes and move to jvmDemo (#286)
This commit is contained in:
21
orx-shade-styles/src/jvmDemo/kotlin/DemoRadialGradient01.kt
Normal file
21
orx-shade-styles/src/jvmDemo/kotlin/DemoRadialGradient01.kt
Normal file
@@ -0,0 +1,21 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
|
||||
import org.openrndr.extra.shadestyles.radialGradient
|
||||
import kotlin.math.cos
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend {
|
||||
drawer.shadeStyle = radialGradient(
|
||||
ColorRGBa.PINK,
|
||||
ColorRGBa.PINK.toHSVa().shiftHue(180.0).shade(0.5).toRGBa(),
|
||||
exponent = cos(seconds)*0.5+0.5
|
||||
)
|
||||
drawer.rectangle(120.0, 40.0, 400.0, 400.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user