PointLight constructor

PointLight({
  1. Vector3? color,
  2. double intensity = 1.0,
  3. double range = 0.0,
  4. double falloffExponent = 2.0,
})

Creates a PointLight.

color is the light's linear RGB; intensity scales it and is the radiance at unit distance (point lights fall off with the inverse square of distance, so useful values are often larger than a DirectionalLight's). range is the world-space distance at which the influence reaches zero; 0 (the default) means infinite range (pure inverse-square falloff).

Implementation

PointLight({
  Vector3? color,
  this.intensity = 1.0,
  this.range = 0.0,
  this.falloffExponent = 2.0,
}) : color = color ?? Vector3(1.0, 1.0, 1.0);