[orx-marching-squares] Change findContours to return List<ShapeContour>

This commit is contained in:
Edwin Jakobs
2023-02-02 22:03:51 +01:00
parent 9019e7e7ea
commit 5e6123c958
5 changed files with 65 additions and 18 deletions

View File

@@ -14,8 +14,9 @@ fun main() {
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = ColorRGBa.PINK
fun f(v: Vector2) = v.distanceTo(drawer.bounds.center) - 200.0
val segments = findContours(::f, drawer.bounds, 16.0)
drawer.lineSegments(segments)
val contours = findContours(::f, drawer.bounds, 16.0)
drawer.fill = null
drawer.contours(contours)
}
}
}