SpotLight constructor
SpotLight({
- Vector3? color,
- double intensity = 1.0,
- double range = 0.0,
- double falloffExponent = 2.0,
- Vector3? direction,
- double innerConeAngle = 0.0,
- double outerConeAngle = math.pi / 4.0,
- bool castsShadow = false,
- int shadowMapResolution = 1024,
- double shadowNear = 0.1,
- double shadowDepthBias = 0.0,
- double shadowNormalBias = 0.1,
- double shadowSoftness = 1.0,
- 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);