A component that defines a spotlight source.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
Framework
- Reality
Kit
Declaration
struct SpotLightComponent
A component that defines a spotlight source.
SDKs
Framework
struct SpotLightComponent
init(color: Spot Light Component .Color, intensity: Float, inner Angle In Degrees: Float, outer Angle In Degrees: Float, attenuation Radius: Float)
Creates a spotlight with the given parameters.
init(color: Spot Light Component .Color, intensity: Float, inner Angle In Degrees: Float, outer Angle In Degrees: Float, attenuation Radius: Float)
Creates a spotlight with the given parameters.
var color: Spot Light Component .Color
A color for the spotlight.
var color: Spot Light Component .Color
A color for the spotlight.
typealias Spot Light Component .Color
A platform-specific type used to define color for a spotlight.
var intensity: Float
The intensity of the spotlight measured in lumen.
var inner Angle In Degrees: Float
The inner angle of the spotlight in degrees.
var outer Angle In Degrees: Float
The outer angle of the spotlight in degrees.
var attenuation Radius: Float
The attenuation radius in meters, after which the intensity of the spotlight is zero.
struct Spot Light Component .Shadow
Characteristics of a shadow for the spotlight.
static func register Component()
Registers a new component type.
static func == (Spot Light Component, Spot Light Component) -> Bool
Indicates whether two spotlight components are equal.
static func != (Spot Light Component, Spot Light Component) -> Bool
Indicates whether two spotlight components are not equal.
var light: Spot Light Component
A spotlight component for the entity.
var shadow: Spot Light Component .Shadow?
The shadow cast by a spot light.
protocol Has Spot Light
An interface that defines a spot light source component.