DirectionalLight constructor
DirectionalLight({
- Vector3? direction,
- Vector3? color,
- double intensity = 3.0,
- bool castsShadow = false,
- double shadowFadeRange = 2.0,
- double shadowSoftness = 0.08,
- int shadowCascadeCount = 4,
- double shadowMaxDistance = 150.0,
- double shadowCascadeSplitLambda = 0.6,
- int shadowMapResolution = 1024,
- double shadowDepthBias = 0.02,
- double shadowNormalBias = 0.02,
Creates a DirectionalLight.
direction is the direction the light travels in world space (from
the light toward the scene). color is the light's linear RGB;
intensity scales it.
Implementation
DirectionalLight({
Vector3? direction,
Vector3? color,
this.intensity = 3.0,
this.castsShadow = false,
this.shadowFadeRange = 2.0,
this.shadowSoftness = 0.08,
this.shadowCascadeCount = 4,
this.shadowMaxDistance = 150.0,
this.shadowCascadeSplitLambda = 0.6,
this.shadowMapResolution = 1024,
this.shadowDepthBias = 0.02,
this.shadowNormalBias = 0.02,
}) : direction = direction ?? Vector3(-0.3, -1.0, -0.2),
color = color ?? Vector3(1.0, 1.0, 1.0);