code: function PoissonDiskSampling (shape, minDistance, maxDistance, maxTries, rng) {
      maxDistance = maxDistance || minDistance * 2;
  
      this.shape = shape;
      this.dimension = this.shape.length;
      this.minDistance = minDistance;
      this.squaredMinDistance = minDistance * minDistance;
      this.deltaDistance = maxDistance - minDistance;
      this.cellSize = minDistance / Math.sqrt(this.dimension);
      this.maxTries = maxTries || 30;
      this.rng = rng || Math.random;
  
      this.neighbourhood = getNeighbourhood(this.dimension);
  
      this.currentPoint = null;
      this.processList = [];
      this.samplePoints = [];
  
      // cache grid
  
      this.gridShape = [];
  
      for (var i = 0; i < this.dimension; i++) {
          this.gridShape.push(Math.ceil(shape[i] / this.cellSize));
      }
  
      this.grid = zeros(this.gridShape, 'uint32'); //will store references to samplePoints
  }
docs: PoissonDiskSampling constructor
  @param {Array} shape Shape of the space
  @param {float} minDistance Minimum distance between each points
  @param {float} [maxDistance] Maximum distance between each points, defaults to minDistance * 2
  @param {int} [maxTries] Number of times the algorithm has to try to place a point in the neighbourhood of another points, defaults to 30
  @param {function|null} [rng] RNG function, defaults to Math.random
  @constructor