PointLight constructor
PointLight({
- Vector3? color,
- double intensity = 1.0,
- double range = 0.0,
- double falloffExponent = 2.0,
- double radius = 0.0,
- bool castsShadow = false,
- int shadowMapResolution = 512,
- double shadowNear = 0.1,
- double shadowDepthBias = 0.0,
- double shadowNormalBias = 0.1,
- double shadowSoftness = 1.0,
- ShadowCasterFaces shadowCasterFaces = ShadowCasterFaces.front,
- int channelMask = 0xFF,
- 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);