new PoissonDisk( [mode] [, initialDistance] [, decayFactor] [, maxTests])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
mode |
<optional> |
Whether the points should be contained in a square ( |
|
initialDistance |
<optional> |
||
decayFactor |
<optional> |
||
maxTests |
<optional> |
Members
-
<static> CIRCULAR
-
Generates points in a circle.
-
<static> SQUARE
-
Generates points in a square.
Methods
-
generatePoint()
-
Generates a single point and adds it to the set.
-
generatePoints(numPoints)
-
Generates new points and add them to the set. This does not return a set of points.
Parameters:
Name Type Description numPoints
The amount of points to generate.
-
getPoints()
-
Gets all points currently generated.
-
reset()
-
Clears all generated points.