[orx-shapes] Refactor package layout

This commit is contained in:
Edwin Jakobs
2024-01-23 09:38:43 +01:00
parent 78ba51ca85
commit 8fbb106823
54 changed files with 138 additions and 91 deletions

View File

@@ -0,0 +1,24 @@
package primitives
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.primitives.regularStar
import kotlin.math.cos
import kotlin.math.sin
fun main() = application {
program {
extend {
drawer.fill = ColorRGBa.PINK
drawer.stroke = ColorRGBa.WHITE
val radius0 = cos(seconds + 2) * 50.0 + 130.0
val radius1 = sin(seconds + 2) * 50.0 + 130.0
val star = regularStar(5, radius0, radius1)
drawer.translate(width / 2.0, height / 2.0)
drawer.rotate(seconds * 45.0)
drawer.contour(star)
}
}
}