DirectionalLightComponent constructor

DirectionalLightComponent(
  1. DirectionalLight light
)

Creates a component that lights the scene with light.

Implementation

DirectionalLightComponent(this.light)
  : assert(
      _hasDefaultDirection(light),
      'DirectionalLight.direction is ignored by DirectionalLightComponent. '
      'Aim the owning node or use DirectionalLightComponent.aimed.',
    ),
    _usesLightDirection = false,
    _localDirection = null;