Demos: ensure all use fun main() = application {
- Adjust some demo window sizes. - Replace Random.double by Double.uniform - Tweak some demos so screenshots look more interesting
This commit is contained in:
@@ -8,24 +8,22 @@ import org.openrndr.extra.shapes.tunni.withTunniLine
|
||||
import org.openrndr.shape.Circle
|
||||
import kotlin.math.cos
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
program {
|
||||
extend {
|
||||
val c = Circle(drawer.bounds.center, 200.0).contour
|
||||
val c2 = adjustContour(c) {
|
||||
selectEdges { it -> true }
|
||||
for (e in edges) {
|
||||
val tl = e.tunniLine
|
||||
e.withTunniLine(tl.position(0.5) + tl.normal * cos(seconds)*200.0)
|
||||
}
|
||||
fun main() = application {
|
||||
program {
|
||||
extend {
|
||||
val c = Circle(drawer.bounds.center, 200.0).contour
|
||||
val c2 = adjustContour(c) {
|
||||
selectEdges { it -> true }
|
||||
for (e in edges) {
|
||||
val tl = e.tunniLine
|
||||
e.withTunniLine(tl.position(0.5) + tl.normal * cos(seconds) * 200.0)
|
||||
}
|
||||
for (s in c2.segments) {
|
||||
drawer.stroke = ColorRGBa.WHITE
|
||||
drawer.lineSegment(s.tunniLine)
|
||||
}
|
||||
drawer.contour(c2)
|
||||
}
|
||||
for (s in c2.segments) {
|
||||
drawer.stroke = ColorRGBa.WHITE
|
||||
drawer.lineSegment(s.tunniLine)
|
||||
}
|
||||
drawer.contour(c2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user