---
title: HasDirectionalLight
framework: realitykit
role: symbol
role_heading: Protocol
path: realitykit/hasdirectionallight
---

# HasDirectionalLight

An interface that defines a directional light source component.

## Declaration

```swift
@MainActor @preconcurrency protocol HasDirectionalLight : HasTransform
```

## Topics

### Getting the directional light

- [light](realitykit/hasdirectionallight/light.md)

### Specifying the shadow

- [shadow](realitykit/hasdirectionallight/shadow.md)

## Relationships

### Inherits From

- [HasTransform](realitykit/hastransform.md)

### Conforming Types

- [DirectionalLight](realitykit/directionallight.md)

## See Also

### Entity compliance

- [HasPerspectiveCamera](realitykit/hasperspectivecamera.md)
- [PointLight](realitykit/pointlight.md)
- [HasPointLight](realitykit/haspointlight.md)
- [SpotLight](realitykit/spotlight.md)
- [HasSpotLight](realitykit/hasspotlight.md)
- [DirectionalLight](realitykit/directionallight.md)
