Structure

DirectionalLightComponent

A component that defines a directional light source.

Declaration

struct DirectionalLightComponent

Topics

Creating a Directional Light

Setting the Color

var color: DirectionalLightComponent.Color

A color for the directional light.

var color: DirectionalLightComponent.Color

A color for the directional light.

typealias DirectionalLightComponent.Color

A platform-specific type used to define color for a directional light.

Setting Intensity and Shadows

var intensity: Float

The intensity of the directional light, measured in lumen per square meter.

struct DirectionalLightComponent.Shadow

Shadow characteristics for a directional light.

var isRealWorldProxy: Bool

A Boolean that you use to control whether the directional light operates as a proxy for a real-world light.

Registering a Component Type

static func registerComponent()

Registers a new component type.

Comparing Directional Light Components

static func == (DirectionalLightComponent, DirectionalLightComponent) -> Bool

Indicates whether two directional light components are equal.

static func != (DirectionalLightComponent, DirectionalLightComponent) -> Bool

Indicates whether two directional light components are not equal.

Relationships

Conforms To

See Also

Configuring the Directional Light

var light: DirectionalLightComponent

A directional light component for the entity.

var shadow: DirectionalLightComponent.Shadow?

The shadow cast by a directional light.

protocol HasDirectionalLight

An interface that defines a directional light source component.