ScatterOptions constructor

ScatterOptions({
  1. required Object3D mesh,
  2. bool spreadFunction(
    1. Vector3,
    2. double,
    3. Vector3,
    4. int,
    )?,
  3. Object3D? scene,
  4. double spread = 0.025,
  5. double smoothSpread = 0,
  6. double sizeVariance = 0.1,
  7. double maxSlope = 0.6283185307179586,
  8. double maxTilt = double.infinity,
  9. double w = 0,
  10. double h = 0,
  11. double randomness(
    1. num
    )?,
})

Implementation

ScatterOptions({
  required this.mesh,
  this.spreadFunction,
  this.scene,
  this.spread = 0.025,
  this.smoothSpread = 0,
  this.sizeVariance = 0.1,
  this.maxSlope = 0.6283185307179586,
  this.maxTilt = double.infinity,
  this.w = 0,
  this.h = 0,
  double Function(num)? randomness
}){
  this.randomness = randomness ?? (k){ return math.Random().nextDouble();};
}