Structure

SpotLightComponent

A component that defines a spotlight source.

Declaration

struct SpotLightComponent

Topics

Setting the Color

var color: SpotLightComponent.Color

A color for the spotlight.

var color: SpotLightComponent.Color

A color for the spotlight.

typealias SpotLightComponent.Color

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

Configuring the Spotlight

var intensity: Float

The intensity of the spotlight measured in lumen.

var innerAngleInDegrees: Float

The inner angle of the spotlight in degrees.

var outerAngleInDegrees: Float

The outer angle of the spotlight in degrees.

var attenuationRadius: Float

The attenuation radius in meters, after which the intensity of the spotlight is zero.

struct SpotLightComponent.Shadow

Characteristics of a shadow for the spotlight.

Registering a Components Type

static func registerComponent()

Registers a new component type.

Comparing Spotlight Components

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

Indicates whether two spotlight components are equal.

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

Indicates whether two spotlight components are not equal.

Relationships

Conforms To

See Also

Configuring the Spot Light

var light: SpotLightComponent

A spotlight component for the entity.

var shadow: SpotLightComponent.Shadow?

The shadow cast by a spot light.

protocol HasSpotLight

An interface that defines a spot light source component.