SpotLight constructor

SpotLight({
  1. Vector3? color,
  2. double intensity = 1.0,
  3. double range = 0.0,
  4. double falloffExponent = 2.0,
  5. Vector3? direction,
  6. double innerConeAngle = 0.0,
  7. double outerConeAngle = math.pi / 4.0,
  8. bool castsShadow = false,
  9. int shadowMapResolution = 1024,
  10. double shadowNear = 0.1,
  11. double shadowDepthBias = 0.0,
  12. double shadowNormalBias = 0.1,
  13. double shadowSoftness = 1.0,
  14. ShadowCasterFaces shadowCasterFaces = ShadowCasterFaces.front,
})

Creates a SpotLight.

direction is the cone's aim in the owning node's local space (rotated to world by the node's transform). innerConeAngle and outerConeAngle are half-angles in radians: the cone is full brightness within innerConeAngle of the axis and falls to zero at outerConeAngle. Both must satisfy 0 <= inner < outer < pi/2.

Implementation

SpotLight({
  Vector3? color,
  this.intensity = 1.0,
  this.range = 0.0,
  this.falloffExponent = 2.0,
  Vector3? direction,
  this.innerConeAngle = 0.0,
  this.outerConeAngle = math.pi / 4.0,
  this.castsShadow = false,
  this.shadowMapResolution = 1024,
  this.shadowNear = 0.1,
  this.shadowDepthBias = 0.0,
  this.shadowNormalBias = 0.1,
  this.shadowSoftness = 1.0,
  this.shadowCasterFaces = ShadowCasterFaces.front,
}) : color = color ?? Vector3(1.0, 1.0, 1.0),
     direction = direction ?? Vector3(0.0, -1.0, 0.0);