PointLight constructor

PointLight({
  1. Vector3? color,
  2. double intensity = 1.0,
  3. double range = 0.0,
  4. double falloffExponent = 2.0,
  5. double radius = 0.0,
  6. bool castsShadow = false,
  7. int shadowMapResolution = 512,
  8. double shadowNear = 0.1,
  9. double shadowDepthBias = 0.0,
  10. double shadowNormalBias = 0.1,
  11. double shadowSoftness = 1.0,
  12. ShadowCasterFaces shadowCasterFaces = ShadowCasterFaces.front,
  13. int channelMask = 0xFF,
  14. int shadowCasterChannelMask = 0xFF,
})

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,
  this.radius = 0.0,
  this.castsShadow = false,
  this.shadowMapResolution = 512,
  this.shadowNear = 0.1,
  this.shadowDepthBias = 0.0,
  this.shadowNormalBias = 0.1,
  this.shadowSoftness = 1.0,
  this.shadowCasterFaces = ShadowCasterFaces.front,
  this.channelMask = 0xFF,
  this.shadowCasterChannelMask = 0xFF,
}) : color = color ?? Vector3(1.0, 1.0, 1.0);