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> |
Properties:
Name | Type | Description |
---|---|---|
points |
An array of all points currently generated. |
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.
-
reset()
-
Clears all generated points.