[orx-shapes] Add alpha shapes with holes using opernndr's Shape (#206)
This commit is contained in:
committed by
GitHub
parent
6705ef9737
commit
e0fae088c3
@@ -7,14 +7,14 @@ import kotlin.random.Random
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val points = List(20) {
|
||||
val points = List(40) {
|
||||
Vector2(
|
||||
Random.nextDouble(width*0.25, width*0.75),
|
||||
Random.nextDouble(height*0.25, height*0.75)
|
||||
)
|
||||
}
|
||||
val alphaShape = AlphaShape(points)
|
||||
val c = alphaShape.create()
|
||||
val c = alphaShape.createContour()
|
||||
val hobby = hobbyCurve(c.segments.map { it.start }, closed=true)
|
||||
extend {
|
||||
drawer.fill = ColorRGBa.PINK
|
||||
|
||||
Reference in New Issue
Block a user