Fix poissonDiskSampling signature change in demos (#225)
This commit is contained in:
@@ -22,7 +22,7 @@ fun main() {
|
||||
|
||||
val circle = Circle(Vector2(400.0), 250.0)
|
||||
|
||||
val points = poissonDiskSampling(width * 1.0, height * 1.0, 30.0)
|
||||
val points = poissonDiskSampling(drawer.bounds, 30.0)
|
||||
.filter { circle.contains(it) }
|
||||
|
||||
val delaunay = Delaunay.from(points + circle.contour.equidistantPositions(40))
|
||||
|
||||
@@ -21,7 +21,7 @@ fun main() {
|
||||
|
||||
val frame = Rectangle.fromCenter(Vector2(400.0), 600.0, 600.0)
|
||||
|
||||
val points = poissonDiskSampling(frame.width, frame.height, 50.0).map { it + frame.corner }
|
||||
val points = poissonDiskSampling(frame, 50.0).map { it + frame.corner }
|
||||
|
||||
val delaunay = Delaunay.from(points)
|
||||
val halfedges = delaunay.halfedges()
|
||||
|
||||
@@ -23,7 +23,7 @@ fun main() {
|
||||
val circle = Circle(Vector2(400.0), 250.0)
|
||||
val frame = Rectangle.fromCenter(Vector2(400.0), 600.0, 600.0)
|
||||
|
||||
val points = poissonDiskSampling(width * 1.0, height * 1.0, 30.0)
|
||||
val points = poissonDiskSampling(drawer.bounds, 30.0)
|
||||
.filter { circle.contains(it) }
|
||||
|
||||
val delaunay = Delaunay.from(points + circle.contour.equidistantPositions(40))
|
||||
|
||||
Reference in New Issue
Block a user