DirectionalLight constructor
DirectionalLight({
- Vector3? direction,
- Vector3? color,
- double intensity = 3.0,
- int priority = 0,
- bool castsShadow = false,
- bool cacheStaticShadows = true,
- 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,
- double shadowAmbientStrength = 0.0,
- DirectionalShadowFilter shadowFilter = DirectionalShadowFilter.rotatedPoisson,
- ShadowCasterFaces shadowCasterFaces = ShadowCasterFaces.front,
- bool contactShadows = false,
- double contactShadowDistance = 0.3,
- double angularRadius = 0.005,
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.priority = 0,
this.castsShadow = false,
this.cacheStaticShadows = true,
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,
this.shadowAmbientStrength = 0.0,
this.shadowFilter = DirectionalShadowFilter.rotatedPoisson,
this.shadowCasterFaces = ShadowCasterFaces.front,
this.contactShadows = false,
this.contactShadowDistance = 0.3,
this.angularRadius = 0.005,
}) : direction = direction ?? defaultDirection,
color = color ?? Vector3(1.0, 1.0, 1.0);